Project

General

Profile

Actions

Bug #3188

closed
SB SB

Use FatalError wherever possible

Bug #3188: Use FatalError wherever possible

Added by Shivani Bhardwaj over 6 years ago. Updated over 5 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.

VJ Updated by Victor Julien over 6 years ago Actions #1

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?

SB Updated by Shivani Bhardwaj over 6 years ago Actions #2

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.

VJ Updated by Victor Julien over 6 years ago Actions #3

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

VJ Updated by Victor Julien about 6 years ago Actions #4

  • Priority changed from Normal to Low

VJ Updated by Victor Julien almost 6 years ago Actions #5

  • Target version changed from 6.0.0beta1 to 7.0.0-beta1

SB Updated by Shivani Bhardwaj over 5 years ago Actions #6

  • Status changed from Assigned to Closed

VJ Updated by Victor Julien over 5 years ago Actions #7

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

Also available in: PDF Atom