summaryrefslogtreecommitdiff
path: root/examples/C
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-04-24 11:20:03 +0200
committerLubomir Rintel <lkundrak@v3.sk>2018-05-10 14:36:58 +0200
commite69d386975be997d3d840de9045e51521ac4474c (patch)
treec240198404e8bdc5396c3e9608d0cc387337abfc /examples/C
parentf0c1efbf426260c6ed45f3ae83b9a4e2b5a347c4 (diff)
downloadNetworkManager-e69d386975be997d3d840de9045e51521ac4474c.tar.gz
all: use the elvis operator wherever possible
Coccinelle: @@ expression a, b; @@ -a ? a : b +a ?: b Applied with: spatch --sp-file ternary.cocci --in-place --smpl-spacing --dir . With some manual adjustments on spots that Cocci didn't catch for reasons unknown. Thanks to the marvelous effort of the GNU compiler developer we can now spare a couple of bits that could be used for more important things, like this commit message. Standards commitees yet have to catch up.
Diffstat (limited to 'examples/C')
-rw-r--r--examples/C/glib/get-ap-info-libnm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/C/glib/get-ap-info-libnm.c b/examples/C/glib/get-ap-info-libnm.c
index b312356c76..c11d414651 100644
--- a/examples/C/glib/get-ap-info-libnm.c
+++ b/examples/C/glib/get-ap-info-libnm.c
@@ -180,7 +180,7 @@ show_wifi_device_info (NMDevice *device)
speed /= 1000;
printf ("Device: %s ---- Driver: %s ---- Speed: %d Mbit/s ---- Active AP: %s\n",
- iface, driver, speed, active_ssid_str ? active_ssid_str : "none");
+ iface, driver, speed, active_ssid_str ?: "none");
printf ("=================================================================================\n");
g_free (active_ssid_str);