From c461e6d76b27b11284dda66316263696d5266764 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 23 Dec 2020 17:32:57 -0800 Subject: [clang-tidy] Fix bugprone string compare Found with bugprone-suspicious-string-compare Signed-off-by: Rosen Penev --- tools/idevicebackup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/idevicebackup.c') 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); } -- cgit v1.1-32-gdbae