From 117d079199a723d06cfd4daee386a0e54423e8ba Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 1 Feb 2018 12:25:39 +0100 Subject: [PATCH] lib/exec_shell: cleanup function attributes Reported-by: Sami Kerola Signed-off-by: Karel Zak --- include/exec_shell.h | 7 ++++++- lib/exec_shell.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/exec_shell.h b/include/exec_shell.h index a2aa757dec..04aa089cc9 100644 --- a/include/exec_shell.h +++ b/include/exec_shell.h @@ -1 +1,6 @@ -extern void __attribute__((__noreturn__)) exec_shell(void); +#ifndef UTIL_LINUX_EXEC_SHELL_H +#define UTIL_LINUX_EXEC_SHELL_H + +extern void exec_shell(void) __attribute__((__noreturn__)); + +#endif /* UTIL_LINUX_EXEC_SHELL_H */ diff --git a/lib/exec_shell.c b/lib/exec_shell.c index a7374bd334..b2f178add2 100644 --- a/lib/exec_shell.c +++ b/lib/exec_shell.c @@ -30,7 +30,7 @@ #define DEFAULT_SHELL "/bin/sh" -void exec_shell(void) +void __attribute__((__noreturn__)) exec_shell(void) { const char *shell = getenv("SHELL"); char *shellc = xstrdup(shell); -- 2.47.3