test/state: fix tautological test
authorRan Benita <ran234@gmail.com>
Fri, 7 Feb 2014 22:42:54 +0000 (00:42 +0200)
committerRan Benita <ran234@gmail.com>
Fri, 7 Feb 2014 22:54:53 +0000 (00:54 +0200)
test/state.c:376:5: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

Signed-off-by: Ran Benita <ran234@gmail.com>
test/state.c

index 507ccfc..89b3c2f 100644 (file)
@@ -373,7 +373,7 @@ test_caps_keysym_transformation(struct xkb_keymap *keymap)
 
     caps = xkb_keymap_mod_get_index(keymap, XKB_MOD_NAME_CAPS);
     shift = xkb_keymap_mod_get_index(keymap, XKB_MOD_NAME_SHIFT);
-    assert(caps >= 0 && shift >= 0);
+    assert(caps != XKB_MOD_INVALID && shift != XKB_MOD_INVALID);
 
     assert(xkb_state_key_get_layout(state, KEY_A + 8) == 0);
     assert(xkb_state_key_get_layout(state, KEY_SEMICOLON + 8) == 0);