[Freeswitch-svn] [commit] r8621 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/su

Freeswitch SVN mikej at freeswitch.org
Sun May 25 11:10:04 EDT 2008


Author: mikej
Date: Sun May 25 11:10:04 2008
New Revision: 8621

Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c

Log:
Tue May 20 13:28:44 EDT 2008  Pekka.Pessi at nokia.com
  * su_alloc.c: fixed klocworks issues


Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Sun May 25 11:10:04 2008
@@ -1 +1 @@
-Sun May 25 11:08:26 EDT 2008
+Sun May 25 11:09:54 EDT 2008

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c	Sun May 25 11:10:04 2008
@@ -1088,7 +1088,7 @@
       else
 	used = s->sub_used;
 
-      if ((used && d == NULL) || 3 * used > 2 * d->sub_n) {
+      if (used && (d == NULL || 3 * used > 2 * d->sub_n)) {
 	if (d)
 	  for (n = n2 = d->sub_n; 3 * used > 2 * n2; n2 = 4 * n2 + 3)
 	    ;
@@ -1122,7 +1122,9 @@
 	d = d2;
       }
 
-      if ((n = s->sub_n)) {
+      if (s->sub_used) {
+	n = s->sub_n;
+
 	for (i = 0; i < n; i++)
 	  if (s->sub_nodes[i].sua_data) {
 	    su_block_add(d, s->sub_nodes[i].sua_data)[0] = s->sub_nodes[i];
@@ -1134,6 +1136,7 @@
       }
 
       if (s->sub_stats) {
+				/* XXX */
       }
     }
 
@@ -1649,7 +1652,7 @@
 /** Retrieve statistics from memory home.
  */
 void su_home_get_stats(su_home_t *home, int include_clones, 
-		       su_home_stat_t hs[1],
+		       su_home_stat_t *hs,
 		       isize_t size)
 {
   su_block_t *sub;
@@ -1657,7 +1660,7 @@
   if (hs == NULL || size < (sizeof hs->hs_size))
     return;
 
-  memset(hs, 0, size);
+  memset((void *)hs, 0, size);
 
   sub = MEMLOCK(home);
 



More information about the Freeswitch-svn mailing list