[PATCH] [DEBUG] Do not attempt to output a NULL message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Prevent future problems, as noone calls exverror with a NULL msg
at this time.

Signed-off-by: Peter Rosin <peda@xxxxxxxxxxxxxx>
---
 src/error.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

I stumbled on this when reading the code... Or is msg only ever
NULL when DEBUG is #defined?

Cheers,
Peter

diff --git a/src/error.c b/src/error.c
index 9d31989..5ab69c0 100644
--- a/src/error.c
+++ b/src/error.c
@@ -151,8 +151,8 @@ exverror(int cond, const char *msg, va_list ap)
 		TRACE(("\") pid=%d\n", getpid()));
 	} else
 		TRACE(("exverror(%d, NULL) pid=%d\n", cond, getpid()));
-	if (msg)
 #endif
+	if (msg)
 		exvwarning(-1, msg, ap);
 
 	flushall();
-- 
1.7.9

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux