Actions
Bug #3188
closedUse FatalError wherever possible
Affected Versions:
Effort:
Difficulty:
Label:
Description
Instead of SCLogError and exit, use the available macro FatalError in all the cases.
Actions
        
        
    Added by Shivani Bhardwaj about 6 years ago. Updated over 5 years ago.
Description
Instead of SCLogError and exit, use the available macro FatalError in all the cases.
I wonder if we could use a coccinelle script to do the heavy lifting here. The pattern
SCLogError(...) exit()
Victor Julien wrote:
I wonder if we could use a coccinelle script to do the heavy lifting here. The pattern
[...]
is quite common. @Eric Leblond would this be easy to do?
Keeping a note. Following is the cocci script:
@@
constant C;
constant char[] msg;
@@
- SCLogError(C,
+ FatalError(SC_ERR_FATAL,
  msg);
- exit(EXIT_FAILURE);
	Should be applied after #3053 is merged to avoid too many merge conflicts.
Make sure to add the cocci script to the commit message.