Project

General

Profile

Bug #917 ยป 0041-comments_load-Log-errors-as-such.patch

Marko Lindqvist, 09/27/2024 06:34 AM

View differences:

tools/ruleutil/comments.c
fullpath = fileinfoname(get_data_dirs(), "ruledit/" COMMENTS_FILE_NAME);
if (fullpath == NULL) {
log_normal("Can't find the comments file");
log_error("Can't find the comments file");
return FALSE;
}
comment_file = secfile_load(fullpath, FALSE);
if (comment_file == NULL) {
log_normal("Can't parse the comments file");
log_error("Can't parse the comments file");
return FALSE;
}
......
if ((comment = secfile_lookup_str(comment_file, comment_path))) { \
target = fc_strdup(comment); \
} else { \
log_normal("Can't read %s from comments file", comment_path); \
log_error("Can't read %s from comments file", comment_path); \
return FALSE; \
} \
}
    (1-1/1)