From fc2e4bb48f477a187f9387f89ef46b83db3d1947 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 13 Dec 2017 16:04:53 +0100 Subject: [PATCH] wifi: don't log NULL string in create_device() While glibc's printf is forgiving against printing NULL values, don't do it. --- src/devices/wifi/nm-wifi-factory.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/devices/wifi/nm-wifi-factory.c b/src/devices/wifi/nm-wifi-factory.c index 298b15f143..d3800469b6 100644 --- a/src/devices/wifi/nm-wifi-factory.c +++ b/src/devices/wifi/nm-wifi-factory.c @@ -110,7 +110,11 @@ create_device (NMDeviceFactory *factory, NULL); nm_strstrip (backend); - nm_log_dbg (LOGD_PLATFORM | LOGD_WIFI, "(%s) config: backend is %s, %i", iface, backend, WITH_IWD); + nm_log_dbg (LOGD_PLATFORM | LOGD_WIFI, + "(%s) config: backend is %s%s%s%s", + iface, + NM_PRINT_FMT_QUOTE_STRING (backend), + WITH_IWD ? " (iwd support enabled)" : ""); if (!backend || !strcasecmp (backend, "wpa_supplicant")) return nm_device_wifi_new (iface, capabilities); #if WITH_IWD