]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11785: [core] help clang static analyzer understand this macro construct
authorMike Jerris <mike@signalwire.com>
Tue, 16 Apr 2019 21:57:48 +0000 (15:57 -0600)
committerAndrey Volk <andywolk@gmail.com>
Wed, 17 Jul 2019 17:48:59 +0000 (21:48 +0400)
src/include/switch_core_event_hook.h

index 2e847aaf8d0d5dd34c2b644009dd692c6812a46f..40cdea6baf9f6e2870307ee1abfde817b5c766cf 100644 (file)
@@ -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;                                                           \