Remove the NO_EXIT flag to log_error() and add a log_fatal() function
that exits and is marked no_return. Fixes false positives from static analyzers and is easier for humans to read too.
This commit is contained in:
@@ -120,10 +120,10 @@ sudo_file_parse(struct sudo_nss *nss)
|
||||
yyin = nss->handle;
|
||||
if (yyparse() != 0 || parse_error) {
|
||||
if (errorlineno != -1) {
|
||||
log_error(NO_EXIT, _("parse error in %s near line %d"),
|
||||
log_error(0, _("parse error in %s near line %d"),
|
||||
errorfile, errorlineno);
|
||||
} else {
|
||||
log_error(NO_EXIT, _("parse error in %s"), errorfile);
|
||||
log_error(0, _("parse error in %s"), errorfile);
|
||||
}
|
||||
debug_return_int(-1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user