clang-tidy: fix cmp function usage

Found with bugprone-suspicious-string-compare

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-10-12 23:28:58 -07:00
parent 33f3593436
commit 3e85fc5422
7 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -417,7 +417,7 @@ int main(int argc, char **argv)
printf("using interface name '%s'.\n", ifr.ifr_name);
#endif
if (strcmp(ANYDEV, ifr.ifr_name)) {
if (strcmp(ANYDEV, ifr.ifr_name) != 0) {
if (ioctl(s[i], SIOCGIFINDEX, &ifr) < 0) {
perror("SIOCGIFINDEX");
exit(1);