summaryrefslogtreecommitdiff
path: root/src/nm-config.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 /src/nm-config.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 'src/nm-config.c')
-rw-r--r--src/nm-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nm-config.c b/src/nm-config.c
index bef05fc78c..d4682ed6da 100644
--- a/src/nm-config.c
+++ b/src/nm-config.c
@@ -579,7 +579,7 @@ ignore_config_snippet (GKeyFile *keyfile, gboolean is_base_config)
const char *e;
e = g_getenv ("NM_CONFIG_ENABLE_TAG");
- _nm_config_match_env = g_strdup (e ? e : "");
+ _nm_config_match_env = g_strdup (e ?: "");
}
/* second, interpret the value as match-spec. */
@@ -2407,7 +2407,7 @@ _set_config_data (NMConfig *self, NMConfigData *new_data, NMConfigChangeFlags re
else
_LOGI ("signal: %s", nm_config_change_flags_to_string (changes, NULL, 0));
g_signal_emit (self, signals[SIGNAL_CONFIG_CHANGED], 0,
- new_data ? new_data : old_data,
+ new_data ?: old_data,
changes, old_data);
if (new_data)
g_object_unref (old_data);