summaryrefslogtreecommitdiffstats
path: root/tools/idevicebackup.c
diff options
context:
space:
mode:
authorGravatar Rosen Penev2020-12-23 17:32:57 -0800
committerGravatar Nikias Bassen2022-04-22 16:30:45 +0200
commitc461e6d76b27b11284dda66316263696d5266764 (patch)
tree3d612fc904046a381438cf008448aaf4a1424f10 /tools/idevicebackup.c
parent95316d81633120244d53b85303447beb1a917f74 (diff)
downloadlibimobiledevice-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.c4
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
for ( i = 0; i < 20; i++, p += 2 ) {
snprintf (p, 3, "%02x", (unsigned char)fnhash[i] );
}
- if (strcmp(fnamehash, hash)) {
+ if (strcmp(fnamehash, hash) != 0) {
printf("\r\n");
printf("WARNING: filename hash does not match for entry '%s'\n", hash);
}
@@ -544,7 +544,7 @@ static int mobilebackup_check_file_integrity(const char *backup_directory, const
plist_get_string_val(node, &auth_version);
}
- if (strcmp(auth_version, "1.0")) {
+ if (strcmp(auth_version, "1.0") != 0) {
printf("\r\n");
printf("WARNING: Unknown AuthVersion '%s', DataHash cannot be verified!\n", auth_version);
}