summaryrefslogtreecommitdiffstats
path: root/src/screenshotr.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 /src/screenshotr.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 'src/screenshotr.c')
-rw-r--r--src/screenshotr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/screenshotr.c b/src/screenshotr.c
index 11d6506..77835da 100644
--- a/src/screenshotr.c
+++ b/src/screenshotr.c
@@ -142,7 +142,7 @@ LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_take_screenshot(screenshotr
plist_t node = plist_dict_get_item(dict, "MessageType");
char *strval = NULL;
plist_get_string_val(node, &strval);
- if (!strval || strcmp(strval, "ScreenShotReply")) {
+ if (!strval || strcmp(strval, "ScreenShotReply") != 0) {
debug_info("invalid screenshot data received!");
res = SCREENSHOTR_E_PLIST_ERROR;
goto leave;