aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2014-01-02 14:33:32 +0100
committerMartin Willi <martin@revosec.ch>2014-06-04 15:52:58 +0200
commit087e02e47ebddef0aaad7b0aa554418336cfc517 (patch)
treef75f0027f8e6e04cf65f453ee72491a3cfbb3b7d /src
parent2127831cdaadd42755574e474c8017b752c0e032 (diff)
downloadstrongswan-087e02e47ebddef0aaad7b0aa554418336cfc517.tar.bz2
strongswan-087e02e47ebddef0aaad7b0aa554418336cfc517.tar.xz
backtrace: Inline esc() helper, making it available to all build variants
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/utils/backtrace.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libstrongswan/utils/backtrace.c b/src/libstrongswan/utils/backtrace.c
index 6101fb9c2..3bb163545 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 <dbghelp.h>
@@ -118,18 +130,6 @@ void backtrace_deinit()
#include <dlfcn.h>
#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 <bfd.h>