[tracker/wip/carlosg/coverity-fixes: 1/7] tests: Silence check




commit 574b2ce8cff250e5fa832c7dab2458f33503fc80
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Sep 7 17:45:24 2020 +0200

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

 tests/libtracker-common/tracker-file-utils-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/libtracker-common/tracker-file-utils-test.c 
b/tests/libtracker-common/tracker-file-utils-test.c
index aa6cbf29f..a508386fb 100644
--- a/tests/libtracker-common/tracker-file-utils-test.c
+++ b/tests/libtracker-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]