From ee9e45b3d45f0b6f4342159ec75179df503fdc29 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Tue, 29 Sep 2020 09:06:58 +0200 Subject: [PATCH] Change assertion condition in __FILE__ buf dumping Removes a false positive from Clang static analysis --- src/asm/symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asm/symbol.c b/src/asm/symbol.c index f6d9736f..59c77541 100644 --- a/src/asm/symbol.c +++ b/src/asm/symbol.c @@ -103,7 +103,7 @@ static char const *Callback__FILE__(void) size_t j = 1; /* TODO: is there a way for a file name to be empty? */ - assert(strlen(fileName) != 0); + assert(fileName[0]); /* The assertion above ensures the loop runs at least once */ for (size_t i = 0; fileName[i]; i++, j++) { /* Account for the extra backslash inserted below */