]> git.ipfire.org Git - telemetry.git/commitdiff
file: Convince the static analyzer that we only return < 0
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 1 Dec 2025 15:12:22 +0000 (15:12 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 1 Dec 2025 15:12:22 +0000 (15:12 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/file.c

index c4b53f2cb53e1e813439b065ca1013205a448b76..3fc6ecef965f6bb9b84b06f1340f696972b09177 100644 (file)
@@ -98,6 +98,9 @@ ERROR:
        // Reset file
        *file = NULL;
 
+       // Convince the static analyzer that from here on we will only return negative values
+       assert(r < 0);
+
        return r;
 }
 
@@ -131,6 +134,9 @@ ERROR:
        // Reset file
        *file = NULL;
 
+       // Convince the static analyzer that from here on we will only return negative values
+       assert(r < 0);
+
        return r;
 }