diff options
author | 2020-12-23 17:32:57 -0800 | |
---|---|---|
committer | 2022-04-22 16:30:45 +0200 | |
commit | c461e6d76b27b11284dda66316263696d5266764 (patch) | |
tree | 3d612fc904046a381438cf008448aaf4a1424f10 /tools/idevicebackup.c | |
parent | 95316d81633120244d53b85303447beb1a917f74 (diff) | |
download | libimobiledevice-c461e6d76b27b11284dda66316263696d5266764.tar.gz libimobiledevice-c461e6d76b27b11284dda66316263696d5266764.tar.bz2 |
[clang-tidy] Fix bugprone string compare
Found with bugprone-suspicious-string-compare
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'tools/idevicebackup.c')
-rw-r--r-- | tools/idevicebackup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c index 483f3d6..1e512d8 100644 --- a/tools/idevicebackup.c +++ b/tools/idevicebackup.c | |||
@@ -533,7 +533,7 @@ static int mobilebackup_check_file_integrity(const char *backup_directory, const | |||
533 | for ( i = 0; i < 20; i++, p += 2 ) { | 533 | for ( i = 0; i < 20; i++, p += 2 ) { |
534 | snprintf (p, 3, "%02x", (unsigned char)fnhash[i] ); | 534 | snprintf (p, 3, "%02x", (unsigned char)fnhash[i] ); |
535 | } | 535 | } |
536 | if (strcmp(fnamehash, hash)) { | 536 | if (strcmp(fnamehash, hash) != 0) { |
537 | printf("\r\n"); | 537 | printf("\r\n"); |
538 | printf("WARNING: filename hash does not match for entry '%s'\n", hash); | 538 | printf("WARNING: filename hash does not match for entry '%s'\n", hash); |
539 | } | 539 | } |
@@ -544,7 +544,7 @@ static int mobilebackup_check_file_integrity(const char *backup_directory, const | |||
544 | plist_get_string_val(node, &auth_version); | 544 | plist_get_string_val(node, &auth_version); |
545 | } | 545 | } |
546 | 546 | ||
547 | if (strcmp(auth_version, "1.0")) { | 547 | if (strcmp(auth_version, "1.0") != 0) { |
548 | printf("\r\n"); | 548 | printf("\r\n"); |
549 | printf("WARNING: Unknown AuthVersion '%s', DataHash cannot be verified!\n", auth_version); | 549 | printf("WARNING: Unknown AuthVersion '%s', DataHash cannot be verified!\n", auth_version); |
550 | } | 550 | } |