]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak asserts. Found by Klockwork (www.klocwork.com)
authorMichael Jerris <mike@jerris.com>
Fri, 16 May 2008 16:59:34 +0000 (16:59 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 16 May 2008 16:59:34 +0000 (16:59 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8441 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_event.c

index 03d0eddac7340a5cbb0d081a7c32707d3555e31d..04f8f5d715e9c6870496613cfda74df07e61a1d3 100644 (file)
@@ -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);