From b08c07339a203d9ffb42855ad1e19da378b1b8d3 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 7 Jun 2011 16:18:51 +0000 Subject: [PATCH] Make netutil_fatal return void. --- libnetutil/netutil.cc | 2 +- libnetutil/netutil.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index e32132302..3ffc34906 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -142,7 +142,7 @@ /** Print fatal error messages to stderr and then exits. A newline character is printed automatically after the supplied text. * @warning This function does not return because it calls exit() */ -int netutil_fatal(const char *str, ...){ +void netutil_fatal(const char *str, ...){ va_list list; char errstr[NBASE_MAX_ERR_STR_LEN]; memset(errstr,0, NBASE_MAX_ERR_STR_LEN); diff --git a/libnetutil/netutil.h b/libnetutil/netutil.h index 0a3202d3e..08f1e76b4 100644 --- a/libnetutil/netutil.h +++ b/libnetutil/netutil.h @@ -114,7 +114,7 @@ enum { OP_FAILURE = -1, OP_SUCCESS = 0 }; #define IPPROTO_SCTP 132 #endif -int netutil_fatal(const char *str, ...) +void netutil_fatal(const char *str, ...) __attribute__ ((noreturn)) __attribute__ ((format (printf, 1, 2)));