mirror of https://github.com/ArduPilot/ardupilot
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:
parent
4add35355e
commit
89e5e7f5c5
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue