[tracker-miners/wip/carlosg/coverity-fixes: 13/16] tests: Silence check




commit bd38584bf278cf9edab5faf63d5c5b474fbab6d2
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Sep 7 18:58:59 2020 +0200

    tests: Silence check
    
    Coverity seems to deem it possible to leak a variable after ensuring
    it is NULL. Assert NULLability harder.
    
    CID: #361370

 tests/libtracker-miners-common/tracker-file-utils-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/libtracker-miners-common/tracker-file-utils-test.c 
b/tests/libtracker-miners-common/tracker-file-utils-test.c
index d0f6512f2..1aebf0ba7 100644
--- a/tests/libtracker-miners-common/tracker-file-utils-test.c
+++ b/tests/libtracker-miners-common/tracker-file-utils-test.c
@@ -292,7 +292,7 @@ test_file_utils_open_close ()
         tracker_file_close (f, FALSE);
 
         f = tracker_file_open ("./file-does-NOT-exist");
-        g_assert_true (!f);
+        g_assert_null (f);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]