]> code.delx.au - spectrwm/commitdiff
more clang warnings that are usesul
authormarco <marco@conformal.com>
Tue, 20 Sep 2011 04:18:24 +0000 (23:18 -0500)
committermarco <marco@conformal.com>
Tue, 20 Sep 2011 04:18:24 +0000 (23:18 -0500)
scrotwm.c

index c8fb2d2776249db364aa49486069ccb2bc3855a0..4730a0f20143a61460ef0dce3034803e981c9464 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -1166,8 +1166,8 @@ custom_region(char *val)
        if (w < 1 || h < 1)
                errx(1, "region %ux%u+%u+%u too small\n", w, h, x, y);
 
-       if (x  < 0 || x > DisplayWidth(display, sidx) ||
-           y < 0 || y > DisplayHeight(display, sidx) ||
+       if (x > DisplayWidth(display, sidx) ||
+           y > DisplayHeight(display, sidx) ||
            w + x > DisplayWidth(display, sidx) ||
            h + y > DisplayHeight(display, sidx)) {
                fprintf(stderr, "ignoring region %ux%u+%u+%u "