summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2005-12-19 21:32:51 +0000
committerJamey Sharp <jamey@minilop.net>2005-12-19 21:32:51 +0000
commitb8843578602090a7b07bc9e7063fd0fe36ead3a2 (patch)
treee6ba6e9e1a71ba7cd84a4f64ae5ca4f485e50526
parenta7e912ab731184831991035430d476e631f9e37e (diff)
No side-effecting code inside assert expressions, please.
-rw-r--r--xcb-demo/tests/lissajoux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xcb-demo/tests/lissajoux.c b/xcb-demo/tests/lissajoux.c
index 7f6a834..9ba2996 100644
--- a/xcb-demo/tests/lissajoux.c
+++ b/xcb-demo/tests/lissajoux.c
@@ -134,6 +134,7 @@ shm_test (Data *datap)
if (rep)
{
CARD8 format;
+ int shmctl_status;
if (rep->shared_pixmaps &&
(rep->major_version > 1 || rep->minor_version > 0))
@@ -155,7 +156,8 @@ shm_test (Data *datap)
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)