diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2013-05-17 13:25:40 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2013-05-17 13:30:04 +0200 |
commit | b0e6d1d45438af6a39d4ca8576edce3f6647c46f (patch) | |
tree | df906142f80e5f20f11825b76869f5740018a8f6 /die.h | |
parent | 82799b033807977478d7848d55264f6f3132a5eb (diff) |
die.h: Add __noreturn attribute to exiting functions
Add the __noreturn attribute to all functions which wont return but call
exit() (or die() respectively) themselves.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'die.h')
-rw-r--r-- | die.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -23,17 +23,17 @@ static inline void syslog_panic(const char *format, static inline void syslog_maybe(int may, int priority, const char *format, ...) __check_format_printf(3, 4); -static inline void die(void) +static inline void __noreturn die(void) { exit(EXIT_FAILURE); } -static inline void _die(void) +static inline void __noreturn _die(void) { _exit(EXIT_FAILURE); } -static inline void panic(const char *format, ...) +static inline void __noreturn panic(const char *format, ...) { va_list vl; @@ -44,7 +44,7 @@ static inline void panic(const char *format, ...) die(); } -static inline void syslog_panic(const char *format, ...) +static inline void __noreturn syslog_panic(const char *format, ...) { va_list vl; |