restorecond: add noreturn attribute to exitApp()

This makes it possible for static analyzers such as clang's one to
understand that strings_list_add() cannot dereference a NULL pointer in
the following code:

    if (!newptr)
        exitApp("Out of Memory");
    newptr->string = strdup(string);

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2017-03-05 18:13:00 +01:00 committed by James Carter
parent 43b24f0132
commit e720859f57

View file

@ -33,7 +33,7 @@ extern int run_as_user;
extern int start(void);
extern int server(int, const char *watch_file);
extern void exitApp(const char *msg);
extern void exitApp(const char *msg) __attribute__((__noreturn__));
extern void read_config(int fd, const char *watch_file);
extern int watch(int fd, const char *watch_file);