AP_Logger: fix clang-tidy warning about non correct check

strncmp return both positive and negative value, therefore is it better to implicitly compare to 0
This commit is contained in:
Pierre Kancir 2022-01-03 14:38:36 +01:00 committed by Peter Barker
parent 4add35355e
commit 89e5e7f5c5
1 changed files with 1 additions and 1 deletions

View File

@ -235,7 +235,7 @@ uint16_t AP_Logger_File::find_oldest_log()
// not long enough for \d+[.]BIN
continue;
}
if (strncmp(&de->d_name[length-4], ".BIN", 4)) {
if (strncmp(&de->d_name[length-4], ".BIN", 4) != 0) {
// doesn't end in .BIN
continue;
}