summaryrefslogtreecommitdiffstats
path: root/tools/idevicedebug.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-04-24 12:30:55 +0200
committerGravatar Nikias Bassen2022-04-24 12:30:55 +0200
commit3b5cad28fabb236e05b8fff82fab5098127aa2bb (patch)
treeb7c8f085b374056812e99018dd0230e674cf5eda /tools/idevicedebug.c
parentc461e6d76b27b11284dda66316263696d5266764 (diff)
downloadlibimobiledevice-3b5cad28fabb236e05b8fff82fab5098127aa2bb.tar.gz
libimobiledevice-3b5cad28fabb236e05b8fff82fab5098127aa2bb.tar.bz2
idevicedebug: Fix bad comparison between pointer and integer
This was introduced with commit c461e6d76b27b11284dda66316263696d5266764 where I manually merged some changes and for some reason used NULL instead of 0 as a comparison of str*cmp.
Diffstat (limited to 'tools/idevicedebug.c')
-rw-r--r--tools/idevicedebug.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/idevicedebug.c b/tools/idevicedebug.c
index 7c9205f..01551a2 100644
--- a/tools/idevicedebug.c
+++ b/tools/idevicedebug.c
@@ -406,7 +406,7 @@ int main(int argc, char *argv[])
406 debugserver_command_free(command); 406 debugserver_command_free(command);
407 command = NULL; 407 command = NULL;
408 if (response) { 408 if (response) {
409 if (strncmp(response, "OK", 2) != NULL) { 409 if (strncmp(response, "OK", 2) != 0) {
410 debugserver_client_handle_response(debugserver_client, &response, NULL); 410 debugserver_client_handle_response(debugserver_client, &response, NULL);
411 goto cleanup; 411 goto cleanup;
412 } 412 }
@@ -423,7 +423,7 @@ int main(int argc, char *argv[])
423 debugserver_command_free(command); 423 debugserver_command_free(command);
424 command = NULL; 424 command = NULL;
425 if (response) { 425 if (response) {
426 if (strncmp(response, "OK", 2) != NULL) { 426 if (strncmp(response, "OK", 2) != 0) {
427 debugserver_client_handle_response(debugserver_client, &response, NULL); 427 debugserver_client_handle_response(debugserver_client, &response, NULL);
428 goto cleanup; 428 goto cleanup;
429 } 429 }
@@ -439,7 +439,7 @@ int main(int argc, char *argv[])
439 debugserver_command_free(command); 439 debugserver_command_free(command);
440 command = NULL; 440 command = NULL;
441 if (response) { 441 if (response) {
442 if (strncmp(response, "OK", 2) != NULL) { 442 if (strncmp(response, "OK", 2) != 0) {
443 debugserver_client_handle_response(debugserver_client, &response, NULL); 443 debugserver_client_handle_response(debugserver_client, &response, NULL);
444 goto cleanup; 444 goto cleanup;
445 } 445 }
@@ -480,7 +480,7 @@ int main(int argc, char *argv[])
480 debugserver_command_free(command); 480 debugserver_command_free(command);
481 command = NULL; 481 command = NULL;
482 if (response) { 482 if (response) {
483 if (strncmp(response, "OK", 2) != NULL) { 483 if (strncmp(response, "OK", 2) != 0) {
484 debugserver_client_handle_response(debugserver_client, &response, NULL); 484 debugserver_client_handle_response(debugserver_client, &response, NULL);
485 goto cleanup; 485 goto cleanup;
486 } 486 }
@@ -514,7 +514,7 @@ int main(int argc, char *argv[])
514 debugserver_command_free(command); 514 debugserver_command_free(command);
515 command = NULL; 515 command = NULL;
516 if (response) { 516 if (response) {
517 if (strncmp(response, "OK", 2) != NULL) { 517 if (strncmp(response, "OK", 2) != 0) {
518 debugserver_client_handle_response(debugserver_client, &response, NULL); 518 debugserver_client_handle_response(debugserver_client, &response, NULL);
519 goto cleanup; 519 goto cleanup;
520 } 520 }
@@ -540,7 +540,7 @@ int main(int argc, char *argv[])
540 540
541 if (response) { 541 if (response) {
542 log_debug("response: %s", response); 542 log_debug("response: %s", response);
543 if (strncmp(response, "OK", 2) != NULL) { 543 if (strncmp(response, "OK", 2) != 0) {
544 dres = debugserver_client_handle_response(debugserver_client, &response, &res); 544 dres = debugserver_client_handle_response(debugserver_client, &response, &res);
545 if (dres != DEBUGSERVER_E_SUCCESS) { 545 if (dres != DEBUGSERVER_E_SUCCESS) {
546 log_debug("failed to process response; error %d; %s", dres, response); 546 log_debug("failed to process response; error %d; %s", dres, response);
@@ -567,7 +567,7 @@ int main(int argc, char *argv[])
567 debugserver_command_free(command); 567 debugserver_command_free(command);
568 command = NULL; 568 command = NULL;
569 if (response) { 569 if (response) {
570 if (strncmp(response, "OK", 2) != NULL) { 570 if (strncmp(response, "OK", 2) != 0) {
571 debugserver_client_handle_response(debugserver_client, &response, NULL); 571 debugserver_client_handle_response(debugserver_client, &response, NULL);
572 } 572 }
573 free(response); 573 free(response);
@@ -581,7 +581,7 @@ int main(int argc, char *argv[])
581 debugserver_command_free(command); 581 debugserver_command_free(command);
582 command = NULL; 582 command = NULL;
583 if (response) { 583 if (response) {
584 if (strncmp(response, "OK", 2) != NULL) { 584 if (strncmp(response, "OK", 2) != 0) {
585 debugserver_client_handle_response(debugserver_client, &response, NULL); 585 debugserver_client_handle_response(debugserver_client, &response, NULL);
586 } 586 }
587 free(response); 587 free(response);