summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2022-09-08 10:17:53 -0500
committerDenis Kenzior <denkenz@gmail.com>2022-09-08 10:17:53 -0500
commit1c72e727c81ad7a2ad3548f610cf27a6c618f347 (patch)
treef93aaad9a4df9e251a2618a64bfa1751bdc3717b
parentd80e2afb67c1cda76050388cd46793db4be9c3dc (diff)
downloadofono-1c72e727c81ad7a2ad3548f610cf27a6c618f347.tar.gz
mbmmodem: Fix GCC warning
CC drivers/mbmmodem/gprs-context.o drivers/mbmmodem/gprs-context.c: In function ‘mbm_e2ipcfg_cb’: drivers/mbmmodem/gprs-context.c:138:25: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 138 | ofono_info("IP: %s Gateway: %s", ip, gateway); | ^~
-rw-r--r--drivers/mbmmodem/gprs-context.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mbmmodem/gprs-context.c b/drivers/mbmmodem/gprs-context.c
index d6c3a3ce..35c4e12c 100644
--- a/drivers/mbmmodem/gprs-context.c
+++ b/drivers/mbmmodem/gprs-context.c
@@ -135,12 +135,12 @@ out:
modem = ofono_gprs_context_get_modem(gc);
interface = ofono_modem_get_string(modem, "NetworkInterface");
- ofono_info("IP: %s Gateway: %s", ip, gateway);
- ofono_info("DNS: %s, %s", dns[0], dns[1]);
-
ofono_gprs_context_set_interface(gc, interface);
if (success) {
+ ofono_info("IP: %s Gateway: %s", ip, gateway);
+ ofono_info("DNS: %s, %s", dns[0], dns[1]);
+
ofono_gprs_context_set_ipv4_address(gc, ip, TRUE);
ofono_gprs_context_set_ipv4_netmask(gc, STATIC_IP_NETMASK);
ofono_gprs_context_set_ipv4_dns_servers(gc, dns);