summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-04-18 09:33:32 +0200
committerThomas Haller <thaller@redhat.com>2019-04-18 09:34:29 +0200
commitc6e6dcae70c00cfc71cf0635393ae9e0ec45b980 (patch)
tree6d3e45b34d456f9c411822d747a7e2f70a0fdf5e
parent0e7a5c73247920550665fee4cbc8db1bc10e1c5d (diff)
downloadNetworkManager-c6e6dcae70c00cfc71cf0635393ae9e0ec45b980.tar.gz
ifcfg-rh: fix compiler warning in read_routing_rules_parse()
CC src/settings/plugins/ifcfg-rh/src_settings_plugins_ifcfg_rh_libnms_ifcfg_rh_core_la-nms-ifcfg-rh-reader.lo In file included from ../shared/nm-default.h:280:0, from ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:21: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c: In function read_routing_rules_parse: ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:4309:27: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses] nm_assert (!key_is_ipv4 == NM_STR_HAS_PREFIX (key, "ROUTING_RULE6_")); ^ ../shared/nm-utils/nm-macros-internal.h:1793:7: note: in definition of macro __NM_G_BOOLEAN_EXPR_IMPL if (expr) \ ^ /usr/include/glib-2.0/glib/gmacros.h:376:43: note: in expansion of macro _G_BOOLEAN_EXPR #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR((expr)), 1)) ^ /usr/include/glib-2.0/glib/gtestutils.h:116:49: note: in expansion of macro G_LIKELY if G_LIKELY (expr) ; else \ ^ ../shared/nm-utils/nm-macros-internal.h:973:40: note: in expansion of macro g_assert #define nm_assert(cond) G_STMT_START { g_assert (cond); } G_STMT_END ^ ../src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:4309:3: note: in expansion of macro nm_assert nm_assert (!key_is_ipv4 == NM_STR_HAS_PREFIX (key, "ROUTING_RULE6_")); ^ Fixes: 4d4680443742f6abcc14099f6dfade318a6aa583
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
index ff71b71017..35ed11096c 100644
--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
@@ -4305,8 +4305,8 @@ read_routing_rules_parse (shvarFile *ifcfg,
gboolean key_is_ipv4;
key_is_ipv4 = (key[NM_STRLEN ("ROUTING_RULE")] == '_');
- nm_assert ( key_is_ipv4 == NM_STR_HAS_PREFIX (key, "ROUTING_RULE_"));
- nm_assert (!key_is_ipv4 == NM_STR_HAS_PREFIX (key, "ROUTING_RULE6_"));
+ nm_assert ( key_is_ipv4 == NM_STR_HAS_PREFIX (key, "ROUTING_RULE_"));
+ nm_assert ((!key_is_ipv4) == NM_STR_HAS_PREFIX (key, "ROUTING_RULE6_"));
value = svGetValueStr (ifcfg, key, &value_to_free);
if (!value)