2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00

parser: replace duplicate warn_once() with common function

The warn_once() function is duplicated in 6 different places. A common,
reusable version has been added to parser_common.c.

Signed-off-by: Mike Salvatore <mike.salvatore@canonical.com>
This commit is contained in:
Mike Salvatore
2020-08-09 14:51:55 -04:00
parent 4aabc40d1f
commit 52d9529d1b
15 changed files with 57 additions and 87 deletions

View File

@@ -327,6 +327,7 @@ extern char *current_filename;
extern FILE *ofile;
extern int read_implies_exec;
extern void pwarn(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2)));
extern void common_warn_once(const char *name, const char *msg, const char **warned_name);
/* from parser_main (cannot be used in tst builds) */
extern int force_complain;