[pulseaudio-commits] r1339 - /trunk/src/pulsecore/shm.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Aug 28 12:16:02 PDT 2006


Author: lennart
Date: Mon Aug 28 21:16:00 2006
New Revision: 1339

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1339&root=pulseaudio&view=rev
Log:
fix an misdesigned assert()

Modified:
    trunk/src/pulsecore/shm.c

Modified: trunk/src/pulsecore/shm.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/shm.c?rev=1339&root=pulseaudio&r1=1338&r2=1339&view=diff
==============================================================================
--- trunk/src/pulsecore/shm.c (original)
+++ trunk/src/pulsecore/shm.c Mon Aug 28 21:16:00 2006
@@ -156,10 +156,10 @@
 	    if (m->do_unlink) {
 		    char fn[32];
 
-    	    segment_name(fn, sizeof(fn), m->id);
-
-	        if (shm_unlink(fn) < 0)
-    	        pa_log(__FILE__":shm_unlink(%s) failed: %s", fn, pa_cstrerror(errno));
+                    segment_name(fn, sizeof(fn), m->id);
+                    
+                    if (shm_unlink(fn) < 0)
+                        pa_log(" shm_unlink(%s) failed: %s", fn, pa_cstrerror(errno));
 	    }
 #else
 		/* We shouldn't be here without shm support */
@@ -176,8 +176,7 @@
     assert(m);
     assert(m->ptr);
     assert(m->size > 0);
-    assert(offset < m->size);
-    assert(offset+size < m->size);
+    assert(offset+size <= m->size);
 
 #ifdef MAP_FAILED
 	assert(m->ptr != MAP_FAILED);




More information about the pulseaudio-commits mailing list