]> git.ipfire.org Git - telemetry.git/commitdiff
file: There is no need to attempt to parse empty lines
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 20 Oct 2025 13:24:51 +0000 (13:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 20 Oct 2025 13:24:51 +0000 (13:24 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/file.c

index 5880dafb32b81ffbc601bf8956cf514cede74505..89b0280d14c9ee47fee88859ef261676c031b1cc 100644 (file)
@@ -250,6 +250,10 @@ static int __td_file_parse(td_ctx* ctx, td_file* self,
        td_file_parser* parser = data;
        int r;
 
+       // Skip processing empty lines
+       if (!length)
+               return 0;
+
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wformat-nonliteral"