Tue May 20 13:32:37 EDT 2008 Pekka.Pessi@nokia.com

* su_vector.c: fixed klocwork issues


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8624 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-05-25 15:12:06 +00:00
parent 007f1b4745
commit 913a502a74
2 changed files with 12 additions and 7 deletions

View File

@ -1 +1 @@
Sun May 25 11:11:12 EDT 2008
Sun May 25 11:11:31 EDT 2008

View File

@ -236,13 +236,18 @@ int su_vector_empty(su_vector_t *vector)
*/
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.