[pulseaudio-commits] r1146 - /trunk/src/pulsecore/idxset.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue Jul 25 13:10:31 PDT 2006


Author: lennart
Date: Tue Jul 25 22:10:30 2006
New Revision: 1146

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1146&root=pulseaudio&view=rev
Log:
split a few assert()s

Modified:
    trunk/src/pulsecore/idxset.c

Modified: trunk/src/pulsecore/idxset.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/idxset.c?rev=1146&root=pulseaudio&r1=1145&r2=1146&view=diff
==============================================================================
--- trunk/src/pulsecore/idxset.c (original)
+++ trunk/src/pulsecore/idxset.c Tue Jul 25 22:10:30 2006
@@ -151,13 +151,15 @@
     if (idx < s->start_index)
         return NULL;
     
-    return s->array + (idx - s->start_index);
+    return s->array + idx - s->start_index;
 }
 
 int pa_idxset_put(pa_idxset*s, void *p, uint32_t *idx) {
     unsigned h;
     idxset_entry *e, **a;
-    assert(s && p);
+    
+    assert(s);
+    assert(p);
 
     assert(s->hash_func);
     h = s->hash_func(p) % s->hash_table_size;
@@ -341,7 +343,8 @@
 
 void *pa_idxset_next(pa_idxset *s, uint32_t *idx) {
     idxset_entry **a, *e = NULL;
-    assert(s && idx);
+    assert(s);
+    assert(idx);
 
     if ((a = array_index(s, *idx)) && *a)
         e = (*a)->iterate_next;
@@ -355,7 +358,6 @@
     }
 }
 
-
 int pa_idxset_foreach(pa_idxset*s, int (*func)(void *p, uint32_t idx, int *del, void*userdata), void *userdata) {
     idxset_entry *e;
     assert(s && func);




More information about the pulseaudio-commits mailing list