From 8b522fcfe6f43aa27eaceff59446a362f336a227 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 20 Feb 2010 14:19:52 +0000 Subject: [PATCH] Changed ASSERT_[ALWAYS_]PRINT() to add the additional output to the panic() message instead of printing it before calling panic(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35536 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/debug.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/headers/private/kernel/debug.h b/headers/private/kernel/debug.h index 0d0f4d855d..7508536764 100644 --- a/headers/private/kernel/debug.h +++ b/headers/private/kernel/debug.h @@ -33,24 +33,24 @@ #define ASSERT_ALWAYS(x) \ do { \ if (!(x)) { \ - panic("ASSERT FAILED (%s:%d): %s\n", __FILE__, __LINE__, #x); \ + panic("ASSERT FAILED (%s:%d): %s", __FILE__, __LINE__, #x); \ } \ } while (0) -#define ASSERT_ALWAYS_PRINT(x, format...) \ +#define ASSERT_ALWAYS_PRINT(x, format, args...) \ do { \ if (!(x)) { \ - dprintf_no_syslog(format); \ - panic("ASSERT FAILED (%s:%d): %s\n", __FILE__, __LINE__, #x); \ + panic("ASSERT FAILED (%s:%d): %s; " format, __FILE__, __LINE__, \ + #x, args); \ } \ } while (0) #if KDEBUG -# define ASSERT(x) ASSERT_ALWAYS(x) -# define ASSERT_PRINT(x, format...) ASSERT_ALWAYS_PRINT(x, format) +# define ASSERT(x) ASSERT_ALWAYS(x) +# define ASSERT_PRINT(x, format, args...) ASSERT_ALWAYS_PRINT(x, format, args) #else -# define ASSERT(x) do { } while(0) -# define ASSERT_PRINT(x, format...) do { } while(0) +# define ASSERT(x) do { } while(0) +# define ASSERT_PRINT(x, format, args...) do { } while(0) #endif #if KDEBUG