diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-04-24 11:20:03 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-05-10 14:36:58 +0200 |
commit | e69d386975be997d3d840de9045e51521ac4474c (patch) | |
tree | c240198404e8bdc5396c3e9608d0cc387337abfc /src/dhcp/nm-dhcp-client.c | |
parent | f0c1efbf426260c6ed45f3ae83b9a4e2b5a347c4 (diff) | |
download | NetworkManager-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 'src/dhcp/nm-dhcp-client.c')
-rw-r--r-- | src/dhcp/nm-dhcp-client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dhcp/nm-dhcp-client.c b/src/dhcp/nm-dhcp-client.c index 96c0265388..f407da89ae 100644 --- a/src/dhcp/nm-dhcp-client.c +++ b/src/dhcp/nm-dhcp-client.c @@ -334,7 +334,7 @@ nm_dhcp_client_stop_pid (pid_t pid, const char *iface) g_return_if_fail (pid > 1); - nm_utils_kill_child_sync (pid, SIGTERM, LOGD_DHCP, name ? name : "dhcp-client", NULL, + nm_utils_kill_child_sync (pid, SIGTERM, LOGD_DHCP, name ?: "dhcp-client", NULL, 1000 / 2, 1000 / 20); g_free (name); } |