[Freeswitch-svn] [commit] r8441 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Fri May 16 12:59:34 EDT 2008


Author: mikej
Date: Fri May 16 12:59:34 2008
New Revision: 8441

Modified:
   freeswitch/trunk/src/switch_event.c

Log:
tweak asserts. Found by Klockwork (www.klocwork.com)

Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c	(original)
+++ freeswitch/trunk/src/switch_event.c	Fri May 16 12:59:34 2008
@@ -429,13 +429,15 @@
 {
 	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);



More information about the Freeswitch-svn mailing list