diff uptools/atcmd/smdump.c @ 467:dc2fd8e6f42c

uptools/atcmd: null pointer passing fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 11 Feb 2019 22:17:46 +0000
parents b88a37d4f148
children da724c67159d
line wrap: on
line diff
--- a/uptools/atcmd/smdump.c	Mon Feb 11 05:50:45 2019 +0000
+++ b/uptools/atcmd/smdump.c	Mon Feb 11 22:17:46 2019 +0000
@@ -112,7 +112,8 @@
 {
 	u_char decoded_name[81];
 
-	gsm7_to_ascii_or_ext(pbname_gsm, pbname_len, decoded_name, 0, 0, 0, 0);
+	gsm7_to_ascii_or_ext(pbname_gsm, pbname_len, decoded_name,
+			     (unsigned *) 0, 0, 0, (unsigned *) 0);
 	printf("Phonebook-Name: %s\n", decoded_name);
 }
 
@@ -154,7 +155,7 @@
 
 	for (rec = delafter_head; rec; rec = rec->next) {
 		sprintf(cmgd_cmd, "AT+CMGD=%u", rec->msgid);
-		atinterf_exec_cmd_needok(cmgd_cmd, 0, 0);
+		atinterf_exec_cmd_needok(cmgd_cmd, (char *) 0, (void *) 0);
 	}
 }
 
@@ -180,13 +181,13 @@
 	}
 	atinterf_init();
 	/* enable verbose error messages */
-	atinterf_exec_cmd_needok("AT+CMEE=2", 0, 0);
+	atinterf_exec_cmd_needok("AT+CMEE=2", (char *) 0, (void *) 0);
 	/* put the 07.05 modem in PDU mode */
-	atinterf_exec_cmd_needok("AT+CMGF=0", 0, 0);
+	atinterf_exec_cmd_needok("AT+CMGF=0", (char *) 0, (void *) 0);
 	/* HEX charset for phonebook names */
-	atinterf_exec_cmd_needok("AT+CSCS=\"HEX\"", 0, 0);
+	atinterf_exec_cmd_needok("AT+CSCS=\"HEX\"", (char *) 0, (void *) 0);
 	/* main command */
-	atinterf_exec_cmd_needok("AT+CMGL=4", 0, cmgl_callback);
+	atinterf_exec_cmd_needok("AT+CMGL=4", (char *) 0, cmgl_callback);
 	if (pdu_state) {
 		fprintf(stderr, "error: wrong state at the end of +CMGL\n");
 		exit(ERROR_TARGET);
@@ -194,6 +195,6 @@
 	if (delete_after_flag)
 		delete_after_process();
 	/* be nice and restore IRA charset for manual AT command users */
-	atinterf_exec_cmd_needok("AT+CSCS=\"IRA\"", 0, 0);
+	atinterf_exec_cmd_needok("AT+CSCS=\"IRA\"", (char *) 0, (void *) 0);
 	exit(0);
 }