Change assertion condition in __FILE__ buf dumping

Removes a false positive from Clang static analysis
This commit is contained in:
ISSOtm
2020-09-29 09:06:58 +02:00
parent 5a65188ca9
commit ee9e45b3d4

View File

@@ -103,7 +103,7 @@ static char const *Callback__FILE__(void)
size_t j = 1; size_t j = 1;
/* TODO: is there a way for a file name to be empty? */ /* 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 */ /* The assertion above ensures the loop runs at least once */
for (size_t i = 0; fileName[i]; i++, j++) { for (size_t i = 0; fileName[i]; i++, j++) {
/* Account for the extra backslash inserted below */ /* Account for the extra backslash inserted below */