[Freeswitch-svn] [commit] r9587 - freeswitch/trunk/src/include

Freeswitch SVN mikej at freeswitch.org
Wed Sep 17 21:49:08 EDT 2008


Author: mikej
Date: Wed Sep 17 21:49:08 2008
New Revision: 9587

Modified:
   freeswitch/trunk/src/include/switch_cpp.h

Log:
don't deref NULL.  It can have bad results.

Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h	(original)
+++ freeswitch/trunk/src/include/switch_cpp.h	Wed Sep 17 21:49:08 2008
@@ -10,7 +10,7 @@
 #endif
 #include <switch.h>
 #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;						\



More information about the Freeswitch-svn mailing list