From: Mike Jerris Date: Tue, 16 Apr 2019 21:57:48 +0000 (-0600) Subject: FS-11785: [core] help clang static analyzer understand this macro construct X-Git-Tag: v1.10.0~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3870c0fc2a4e4949e2eb24ba9c1a90d87e666dd2;p=thirdparty%2Ffreeswitch.git FS-11785: [core] help clang static analyzer understand this macro construct --- diff --git a/src/include/switch_core_event_hook.h b/src/include/switch_core_event_hook.h index 2e847aaf8d..40cdea6baf 100644 --- a/src/include/switch_core_event_hook.h +++ b/src/include/switch_core_event_hook.h @@ -213,6 +213,7 @@ extern switch_io_event_hooks_t switch_core_session_get_event_hooks(switch_core_s if (! session->event_hooks._NAME ) { \ session->event_hooks._NAME = hook; \ } else { \ + switch_assert(ptr); \ ptr->next = hook; \ } \ return SWITCH_STATUS_SUCCESS; \