[Xcb-commit] xcb-demo/tests lissajoux.c,1.8,1.9

Jamey Sharp xcb-commit at lists.freedesktop.org
Mon Dec 19 13:32:53 PST 2005


Update of /cvs/xcb/xcb-demo/tests
In directory gabe:/tmp/cvs-serv23977

Modified Files:
	lissajoux.c 
Log Message:
No side-effecting code inside assert expressions, please.

Index: lissajoux.c
===================================================================
RCS file: /cvs/xcb/xcb-demo/tests/lissajoux.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- lissajoux.c	18 Dec 2005 10:31:49 -0000	1.8
+++ lissajoux.c	19 Dec 2005 21:32:51 -0000	1.9
@@ -134,6 +134,7 @@
   if (rep)
     {
       CARD8 format;
+      int shmctl_status;
       
       if (rep->shared_pixmaps && 
 	  (rep->major_version > 1 || rep->minor_version > 0))
@@ -155,7 +156,8 @@
       shminfo.shmseg = XCBShmSEGNew (datap->conn);
       XCBShmAttach (datap->conn, shminfo.shmseg,
 		    shminfo.shmid, 0);
-      assert(shmctl(shminfo.shmid, IPC_RMID, 0) != -1);
+      shmctl_status = shmctl(shminfo.shmid, IPC_RMID, 0);
+      assert(shmctl_status != -1);
     }
 
   if (datap->image)



More information about the xcb-commit mailing list