From d13fa0d211e8e1e7305f96ce3b0abaa7a2b5f293 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 16 May 2008 16:59:34 +0000 Subject: [PATCH] tweak asserts. Found by Klockwork (www.klocwork.com) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8441 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_event.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/switch_event.c b/src/switch_event.c index 03d0eddac7..04f8f5d715 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -429,13 +429,15 @@ SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool) { switch_thread_t *thread; switch_threadattr_t *thd_attr;; + + switch_assert(pool != NULL); + switch_threadattr_create(&thd_attr, pool); switch_threadattr_detach_set(thd_attr, 1); gethostname(hostname, sizeof(hostname)); switch_find_local_ip(guess_ip_v4, sizeof(guess_ip_v4), AF_INET); switch_find_local_ip(guess_ip_v6, sizeof(guess_ip_v6), AF_INET6); - switch_assert(pool != NULL); THRUNTIME_POOL = RUNTIME_POOL = pool; switch_queue_create(&EVENT_QUEUE[0], POOL_COUNT_MAX + 10, THRUNTIME_POOL);