Project

General

Profile

Actions

Bug #3188

closed

Use FatalError wherever possible

Added by Shivani Bhardwaj over 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Instead of SCLogError and exit, use the available macro FatalError in all the cases.

Actions #1

Updated by Victor Julien over 4 years ago

I wonder if we could use a coccinelle script to do the heavy lifting here. The pattern

SCLogError(...)
exit()

is quite common. @Eric Leblond would this be easy to do?

Actions #2

Updated by Shivani Bhardwaj over 4 years ago

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.

Actions #3

Updated by Victor Julien over 4 years ago

Make sure to add the cocci script to the commit message.

Actions #4

Updated by Victor Julien about 4 years ago

  • Priority changed from Normal to Low
Actions #5

Updated by Victor Julien almost 4 years ago

  • Target version changed from 6.0.0beta1 to 7.0.0-beta1
Actions #6

Updated by Shivani Bhardwaj almost 4 years ago

  • Status changed from Assigned to Closed
Actions #7

Updated by Victor Julien almost 4 years ago

  • Priority changed from Low to Normal
  • Target version changed from 7.0.0-beta1 to 6.0.0beta1
Actions

Also available in: Atom PDF