From de3d3106782f304ecc388f2632185381b2d60f8d Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Sat, 16 Nov 2013 11:35:41 +0000 Subject: [PATCH] Change RETURN_STR() macro to silence 'always evaluates to true' warnings. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@475 13b04d17-f746-0410-82c6-800466cd88b0 --- source/functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/functions.c b/source/functions.c index b88564f..edc3bf1 100644 --- a/source/functions.c +++ b/source/functions.c @@ -1252,7 +1252,7 @@ static char *alias_server_version (void) #define GET_INT_ARG(x, y) {RETURN_IF_EMPTY(y); x = atol(safe_new_next_arg(y, &y));} #define GET_FLOAT_ARG(x, y) {RETURN_IF_EMPTY(y); x = atof(safe_new_next_arg(y, &y));} #define GET_STR_ARG(x, y) {RETURN_IF_EMPTY(y); x = new_next_arg(y, &y);RETURN_IF_EMPTY(x);} -#define RETURN_STR(x) return m_strdup((x) ? (x) : EMPTY) +#define RETURN_STR(x) return m_strdup((x) != NULL ? (x) : EMPTY) #define RETURN_MSTR(x) return ((x) ? (x) : EMPTY_STRING); #define RETURN_INT(x) return m_strdup(ltoa(x))