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.
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 @@
debugserver_command_free(command);
command = NULL;
if (response) {
- if (strncmp(response, "OK", 2) != NULL) {
+ if (strncmp(response, "OK", 2) != 0) {
debugserver_client_handle_response(debugserver_client, &response, NULL);
goto cleanup;
}
@@ -423,7 +423,7 @@
debugserver_command_free(command);
command = NULL;
if (response) {
- if (strncmp(response, "OK", 2) != NULL) {
+ if (strncmp(response, "OK", 2) != 0) {
debugserver_client_handle_response(debugserver_client, &response, NULL);
goto cleanup;
}
@@ -439,7 +439,7 @@
debugserver_command_free(command);
command = NULL;
if (response) {
- if (strncmp(response, "OK", 2) != NULL) {
+ if (strncmp(response, "OK", 2) != 0) {
debugserver_client_handle_response(debugserver_client, &response, NULL);
goto cleanup;
}
@@ -480,7 +480,7 @@
debugserver_command_free(command);
command = NULL;
if (response) {
- if (strncmp(response, "OK", 2) != NULL) {
+ if (strncmp(response, "OK", 2) != 0) {
debugserver_client_handle_response(debugserver_client, &response, NULL);
goto cleanup;
}
@@ -514,7 +514,7 @@
debugserver_command_free(command);
command = NULL;
if (response) {
- if (strncmp(response, "OK", 2) != NULL) {
+ if (strncmp(response, "OK", 2) != 0) {
debugserver_client_handle_response(debugserver_client, &response, NULL);
goto cleanup;
}
@@ -540,7 +540,7 @@
if (response) {
log_debug("response: %s", response);
- if (strncmp(response, "OK", 2) != NULL) {
+ if (strncmp(response, "OK", 2) != 0) {
dres = debugserver_client_handle_response(debugserver_client, &response, &res);
if (dres != DEBUGSERVER_E_SUCCESS) {
log_debug("failed to process response; error %d; %s", dres, response);
@@ -567,7 +567,7 @@
debugserver_command_free(command);
command = NULL;
if (response) {
- if (strncmp(response, "OK", 2) != NULL) {
+ if (strncmp(response, "OK", 2) != 0) {
debugserver_client_handle_response(debugserver_client, &response, NULL);
}
free(response);
@@ -581,7 +581,7 @@
debugserver_command_free(command);
command = NULL;
if (response) {
- if (strncmp(response, "OK", 2) != NULL) {
+ if (strncmp(response, "OK", 2) != 0) {
debugserver_client_handle_response(debugserver_client, &response, NULL);
}
free(response);