[Freeswitch-svn] [commit] r8624 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/su
Freeswitch SVN
mikej at freeswitch.org
Sun May 25 11:12:07 EDT 2008
Author: mikej
Date: Sun May 25 11:12:06 2008
New Revision: 8624
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_vector.c
Log:
Tue May 20 13:32:37 EDT 2008 Pekka.Pessi at nokia.com
* su_vector.c: fixed klocwork 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:12:06 2008
@@ -1 +1 @@
-Sun May 25 11:11:12 EDT 2008
+Sun May 25 11:11:31 EDT 2008
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_vector.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_vector.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_vector.c Sun May 25 11:12:06 2008
@@ -236,13 +236,18 @@
*/
int su_vector_append(su_vector_t *vector, void *item)
{
- size_t index = vector->v_len;
+ size_t index;
- if (vector && su_vector_make_place(vector, index)) {
- vector->v_list[index] = item;
- return 0;
- }
- return -1;
+ if (vector == 0)
+ return -1;
+
+ index = vector->v_len;
+
+ if (su_vector_make_place(vector, index) <= 0)
+ return -1;
+
+ vector->v_list[index] = item;
+ return 0;
}
/**Get a numbered item from list.
More information about the Freeswitch-svn
mailing list