From: Michael Jerris Date: Thu, 18 Sep 2008 01:49:08 +0000 (+0000) Subject: don't deref NULL. It can have bad results. X-Git-Tag: v1.0.2~1190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2e04a3a2cf5432ffcb7bb814cc94960cf4c3130;p=thirdparty%2Ffreeswitch.git don't deref NULL. It can have bad results. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9587 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/include/switch_cpp.h b/src/include/switch_cpp.h index f799c57ce0..7120793519 100644 --- a/src/include/switch_cpp.h +++ b/src/include/switch_cpp.h @@ -10,7 +10,7 @@ extern "C" { #endif #include #define this_check(x) do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return x;}} while(0) -#define this_check_void() do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n");}} while(0) +#define this_check_void() do { if (!this) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "object is not initalized\n"); return;}} while(0) #define sanity_check(x) do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return x;}} while(0) #define sanity_check_noreturn do { if (!(session && allocated)) { switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "session is not initalized\n"); return;}} while(0) #define init_vars() allocated = 0; \