From: Martin Willi Date: Thu, 2 Jan 2014 13:33:32 +0000 (+0100) Subject: backtrace: Inline esc() helper, making it available to all build variants X-Git-Tag: 5.2.0dr6~24^2~124 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=087e02e47ebddef0aaad7b0aa554418336cfc517;p=thirdparty%2Fstrongswan.git backtrace: Inline esc() helper, making it available to all build variants --- diff --git a/src/libstrongswan/utils/backtrace.c b/src/libstrongswan/utils/backtrace.c index 6101fb9c2f..3bb1635454 100644 --- a/src/libstrongswan/utils/backtrace.c +++ b/src/libstrongswan/utils/backtrace.c @@ -89,6 +89,18 @@ static void println(FILE *file, char *format, ...) va_end(args); } +/** + * Same as tty_escape_get(), but for a potentially NULL FILE* + */ +static inline char* esc(FILE *file, tty_escape_t escape) +{ + if (file) + { + return tty_escape_get(fileno(file), escape); + } + return ""; +} + #ifdef HAVE_DBGHELP #include @@ -118,18 +130,6 @@ void backtrace_deinit() #include #endif -/** - * Same as tty_escape_get(), but for a potentially NULL FILE* - */ -static char* esc(FILE *file, tty_escape_t escape) -{ - if (file) - { - return tty_escape_get(fileno(file), escape); - } - return ""; -} - #ifdef HAVE_BFD_H #include