summaryrefslogtreecommitdiff
path: root/src/libnm-core-impl/nm-setting-ip-config.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-08-05 17:03:15 +0200
committerLubomir Rintel <lkundrak@v3.sk>2022-08-05 17:47:55 +0200
commit7881904eda6a7cd2af7d9670d56bed026d86b5bc (patch)
tree62afa35934e341536be25f7b219c5251825ac65f /src/libnm-core-impl/nm-setting-ip-config.c
parent3ce34510402517dfdffb8fc541c97ff8a457f0b9 (diff)
downloadNetworkManager-lr/strset.tar.gz
all: avoid useless use of NM_IN_STRSET()lr/strset
Sometimes NM_IN_STRSET() is used for comparing two strings. This hampers readability, making it look like the argument, if it's a macro, expands to multiple values. Other than that it's just odd and useless.
Diffstat (limited to 'src/libnm-core-impl/nm-setting-ip-config.c')
-rw-r--r--src/libnm-core-impl/nm-setting-ip-config.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libnm-core-impl/nm-setting-ip-config.c b/src/libnm-core-impl/nm-setting-ip-config.c
index ab760c4e5f..26ea2785ca 100644
--- a/src/libnm-core-impl/nm-setting-ip-config.c
+++ b/src/libnm-core-impl/nm-setting-ip-config.c
@@ -3417,7 +3417,7 @@ nm_ip_routing_rule_from_string(const char *str,
/* iproute2 matches keywords with any partial prefix. We don't allow
* for that flexibility. */
- if (NM_IN_STRSET(word0, "from")) {
+ if (nm_streq(word0, "from")) {
if (!word1)
continue;
if (word_from)
@@ -3425,7 +3425,7 @@ nm_ip_routing_rule_from_string(const char *str,
word_from = word1;
goto next_words_consumed;
}
- if (NM_IN_STRSET(word0, "to")) {
+ if (nm_streq(word0, "to")) {
if (!word1)
continue;
if (word_to)
@@ -3433,7 +3433,7 @@ nm_ip_routing_rule_from_string(const char *str,
word_to = word1;
goto next_words_consumed;
}
- if (NM_IN_STRSET(word0, "not")) {
+ if (nm_streq(word0, "not")) {
/* we accept multiple "not" specifiers. "not not" still means
* not. */
val_invert = TRUE;
@@ -3477,7 +3477,7 @@ nm_ip_routing_rule_from_string(const char *str,
goto next_fail_word1_invalid_value;
goto next_words_consumed;
}
- if (NM_IN_STRSET(word0, "ipproto")) {
+ if (nm_streq(word0, "ipproto")) {
if (!word1)
continue;
if (i64_ipproto != -1)
@@ -3487,7 +3487,7 @@ nm_ip_routing_rule_from_string(const char *str,
goto next_fail_word1_invalid_value;
goto next_words_consumed;
}
- if (NM_IN_STRSET(word0, "sport")) {
+ if (nm_streq(word0, "sport")) {
if (!word1)
continue;
if (i64_sport_start != -1)
@@ -3496,7 +3496,7 @@ nm_ip_routing_rule_from_string(const char *str,
goto next_fail_word1_invalid_value;
goto next_words_consumed;
}
- if (NM_IN_STRSET(word0, "dport")) {
+ if (nm_streq(word0, "dport")) {
if (!word1)
continue;
if (i64_dport_start != -1)
@@ -3505,7 +3505,7 @@ nm_ip_routing_rule_from_string(const char *str,
goto next_fail_word1_invalid_value;
goto next_words_consumed;
}
- if (NM_IN_STRSET(word0, "fwmark")) {
+ if (nm_streq(word0, "fwmark")) {
if (!word1)
continue;
if (i64_fwmark != -1)
@@ -3532,7 +3532,7 @@ nm_ip_routing_rule_from_string(const char *str,
word_iifname = word1;
goto next_words_consumed;
}
- if (NM_IN_STRSET(word0, "oif")) {
+ if (nm_streq(word0, "oif")) {
if (!word1)
continue;
if (word_oifname)
@@ -3550,7 +3550,7 @@ nm_ip_routing_rule_from_string(const char *str,
goto next_fail_word1_invalid_value;
goto next_words_consumed;
}
- if (NM_IN_STRSET(word0, "uidrange")) {
+ if (nm_streq(word0, "uidrange")) {
if (!word1)
continue;
if (uid_range_has)
@@ -3572,7 +3572,7 @@ nm_ip_routing_rule_from_string(const char *str,
uid_range_has = TRUE;
goto next_words_consumed;
}
- if (NM_IN_STRSET(word0, "type")) {
+ if (nm_streq(word0, "type")) {
if (!word1)
continue;
if (i_action >= 0)