diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-09-24 03:17:18 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-09-24 03:17:18 +1000 |
commit | 8aca647f3184db0d20edd952e8cab8edceb39274 (patch) | |
tree | 4bb878f43ff88a829a8b6fd8e7c3d96002d36c8a | |
parent | 3a524a87582f68dfad75cc4081293b979f243028 (diff) |
common: fix compiler warnings "NULL used for arithmetic"
../../tests/common/helpers.cpp:88:58: warning: NULL used in arithmetic
[-Wpointer-arith]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | tests/common/helpers.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/common/helpers.cpp b/tests/common/helpers.cpp index 9d2a653..9e9f869 100644 --- a/tests/common/helpers.cpp +++ b/tests/common/helpers.cpp @@ -85,7 +85,7 @@ int GetNMonitors (Display *dpy) for (i = 0; i < resources->noutput; ++i) { XRROutputInfo *output = XRRGetOutputInfo (dpy, resources, resources->outputs[i]); - if ((output->connection != RR_Disconnected) && (output->crtc != NULL)) + if ((output->connection != RR_Disconnected) && output->crtc) n_active_outputs++; XRRFreeOutputInfo (output); @@ -105,7 +105,7 @@ void GetMonitorGeometry (Display *dpy, int monitor, int *x, int *y, int *width, for (i = 0; i < resources->noutput; ++i) { XRROutputInfo *output = XRRGetOutputInfo (dpy, resources, resources->outputs[i]); - if ((output->connection == RR_Disconnected) || (output->crtc == NULL)) { + if ((output->connection == RR_Disconnected) || !output->crtc) { XRRFreeOutputInfo (output); continue; } |