Use %tx to print a value of type ptrdiff_t.
authorTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2011 15:28:08 +0000 (17:28 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2011 16:11:46 +0000 (18:11 +0200)
src/libstrongswan/utils/backtrace.c

index 41224e8..5744439 100644 (file)
@@ -80,7 +80,7 @@ static void log_(private_backtrace_t *this, FILE *file, bool detailed)
                        }
                        if (info.dli_sname)
                        {
-                               fprintf(file, "  \e[33m%s\e[0m @ %p (\e[31m%s\e[0m+0x%x) [%p]\n",
+                               fprintf(file, "  \e[33m%s\e[0m @ %p (\e[31m%s\e[0m+0x%tx) [%p]\n",
                                                info.dli_fname, info.dli_fbase, info.dli_sname,
                                                this->frames[i] - info.dli_saddr, this->frames[i]);
                        }