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:
Todd C. Miller
2012-03-26 10:59:14 -04:00
parent 413c2accd9
commit 44ce5720de
14 changed files with 170 additions and 146 deletions

View File

@@ -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);
}