tests: Actually fix relation check
@@ -220,11 +220,11 @@ static void test_examples (void)
keySetName (key, "user/key/folder");
keySetName (check, "user/notsame/folder");
- succeed_if (!(keyCmp (key, check) == 1 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0), "key is not below");
+ succeed_if (keyCmp (key, check) != 0 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0, "key is not below");
keySetName (key, "user/key/folder");
keySetName (check, "system/notsame/folder");
- int has_no_rel = !(keyCmp (key, check) == 1 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0);
+ int has_no_rel = keyCmp (key, check) != 0 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0;
succeed_if (has_no_rel == 1, "not in the same namespace");
keyDel (key);
@@ -248,13 +248,13 @@ static void test_hierarchy (void)
keySetName (key, "user/key/folder/key");
keySetName (check, "system/other/folder/key");
- int has_no_rel = !(keyCmp (key, check) == 1 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0);
+ int has_no_rel = keyCmp (key, check) != 0 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0;
succeed_if (has_no_rel == 1, "should be different (1)");
keySetName (key, "system/key/folder/key");
keySetName (check, "user/other/folder/key");
- has_no_rel = !(keyCmp (key, check) == 1 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0);
+ has_no_rel = keyCmp (key, check) != 0 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0;
succeed_if (has_no_rel == 1, "should be different (2)");
keyDel (key);
keyDel (check);
