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 /libnm-core/nm-setting-adsl.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 'libnm-core/nm-setting-adsl.c')
-rw-r--r-- | libnm-core/nm-setting-adsl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-core/nm-setting-adsl.c b/libnm-core/nm-setting-adsl.c index 8be288b668..c2eb5db419 100644 --- a/libnm-core/nm-setting-adsl.c +++ b/libnm-core/nm-setting-adsl.c @@ -206,7 +206,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, _("'%s' is not a valid value for the property"), - priv->protocol ? priv->protocol : "(null)"); + priv->protocol ?: "(null)"); g_prefix_error (error, "%s.%s: ", NM_SETTING_ADSL_SETTING_NAME, NM_SETTING_ADSL_PROTOCOL); return FALSE; } |