]> granicus.if.org Git - vnstat/commitdiff
fix compiler warnings in tests
authorTeemu Toivola <git@humdi.net>
Fri, 16 Oct 2015 19:34:03 +0000 (22:34 +0300)
committerTeemu Toivola <git@humdi.net>
Fri, 16 Oct 2015 19:34:03 +0000 (22:34 +0300)
tests/database_tests.c
tests/misc_tests.c

index e14b4dea0d8b92902003b9a3f09d8204270c5313..843de4dc756b0c1d5b3c2599409a1cb413990b9f 100644 (file)
@@ -289,7 +289,7 @@ END_TEST
 
 START_TEST(cacheremove_when_empty)
 {
-       ck_assert_int_eq(cacheremove("does_not_exist"), NULL);
+       ck_assert(cacheremove("does_not_exist")==NULL);
 }
 END_TEST
 
index 20ad636003a7450bc0c78c6a8482a4f1fb7cc14a..790e253bd01d2aac541d490136257a039b5c7ea4 100644 (file)
@@ -319,9 +319,9 @@ START_TEST(sighandler_sets_signal)
        debug = 1;
        intsignal = 0;
        disable_logprints();
-       ck_assert_int_ne(signal(SIGINT, sighandler), SIG_ERR);
-       ck_assert_int_ne(signal(SIGHUP, sighandler), SIG_ERR);
-       ck_assert_int_ne(signal(SIGTERM, sighandler), SIG_ERR);
+       ck_assert(signal(SIGINT, sighandler)!=SIG_ERR);
+       ck_assert(signal(SIGHUP, sighandler)!=SIG_ERR);
+       ck_assert(signal(SIGTERM, sighandler)!=SIG_ERR);
 
        ck_assert_int_eq(kill(getpid(), SIGINT), 0);
        ck_assert_int_eq(intsignal, SIGINT);