From: Michael Tremer Date: Mon, 1 Dec 2025 15:12:22 +0000 (+0000) Subject: file: Convince the static analyzer that we only return < 0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58fe1dc9f842c09bb004009f259470f096932a85;p=telemetry.git file: Convince the static analyzer that we only return < 0 Signed-off-by: Michael Tremer --- diff --git a/src/daemon/file.c b/src/daemon/file.c index c4b53f2..3fc6ece 100644 --- a/src/daemon/file.c +++ b/src/daemon/file.c @@ -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; }