Diff between e6eee7c2fcf974dbe56db7fae479bb224685dcb2 and 2c47af011d33eeb3d0a1bf313d3f92bc389fea21

Changed Files

File Additions Deletions Status
android/client/if-hf.c +4 -2 modified

Full Patch

diff --git a/android/client/if-hf.c b/android/client/if-hf.c
index d0e7a66..77216df 100644
--- a/android/client/if-hf.c
+++ b/android/client/if-hf.c
@@ -576,7 +576,7 @@ static void at_response_c(int argc, const char **argv, enum_func *enum_func,
 static void at_response_p(int argc, const char **argv)
 {
 	bthf_at_response_t response_code;
-	int error_code = 0;
+	int error_code;
 
 	RETURN_IF_NULL(if_hf);
 
@@ -588,7 +588,9 @@ static void at_response_p(int argc, const char **argv)
 	response_code = str2bthf_at_response_t(argv[2]);
 
 	/* error code */
-	if (argc >= 3)
+	if (argc <= 3)
+		error_code = 0;
+	else
 		error_code = atoi(argv[3]);
 
 	EXEC(if_hf->at_response, response_code, error_code);