summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-03-28 22:46:55 +0200
committerThomas Haller <thaller@redhat.com>2023-03-29 15:27:51 +0200
commit5eb584f84b6be5a51526bf969a56df75359a2069 (patch)
treea776653e1119b983a01defc2e66b8fa6e9b9f01a
parentda9745b9619a565accb484a65f588282aaeaa28e (diff)
downloadNetworkManager-5eb584f84b6be5a51526bf969a56df75359a2069.tar.gz
platform: explicitly compare seq_result number against WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN
We have other places like nm_assert(!out_seq_result || *out_seq_result == WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN); where we explicitly compare against WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN. Do that here too.
-rw-r--r--src/libnm-platform/nm-linux-platform.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c
index c86f895275..4ca0948540 100644
--- a/src/libnm-platform/nm-linux-platform.c
+++ b/src/libnm-platform/nm-linux-platform.c
@@ -6705,7 +6705,7 @@ delayed_action_wait_for_response_complete(NMPlatform *platform,
nm_assert(NM_FLAGS_ANY(priv->delayed_action.flags, ACTION_TYPE));
nm_assert(idx < priv->delayed_action.list_wait_for_response_x[netlink_protocol]->len);
- nm_assert(seq_result);
+ nm_assert(seq_result != WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
data = delayed_action_get_list_wait_for_resonse(priv, netlink_protocol, idx);
@@ -8095,7 +8095,7 @@ do_add_link_with_lookup(NMPlatform *platform,
delayed_action_handle_all(platform);
- nm_assert(seq_result);
+ nm_assert(seq_result != WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
_NMLOG(seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK ? LOGL_DEBUG : LOGL_WARN,
"do-add-link[%s/%s]: %s",
@@ -8152,7 +8152,7 @@ do_add_addrroute(NMPlatform *platform,
delayed_action_handle_all(platform);
- nm_assert(seq_result);
+ nm_assert(seq_result != WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
_NMLOG((seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK
|| (suppress_netlink_failure && seq_result < 0))
@@ -8210,7 +8210,7 @@ do_delete_object(NMPlatform *platform, const NMPObject *obj_id, struct nl_msg *n
delayed_action_handle_all(platform);
- nm_assert(seq_result);
+ nm_assert(seq_result != WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
success = TRUE;
if (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK) {
@@ -8307,7 +8307,7 @@ retry:
delayed_action_handle_all(platform);
- nm_assert(seq_result);
+ nm_assert(seq_result != WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
if (NM_IN_SET(seq_result, WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK, -EEXIST, -EADDRINUSE)) {
log_level = LOGL_DEBUG;
@@ -9878,7 +9878,7 @@ ip_route_get(NMPlatform *platform,
delayed_action_handle_all(platform);
- nm_assert(seq_result);
+ nm_assert(seq_result != WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
} while (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_FAILED_RESYNC
&& ++try_count < RESYNC_RETRIES);
@@ -9928,7 +9928,7 @@ routing_rule_add(NMPlatform *platform, NMPNlmFlags flags, const NMPlatformRoutin
delayed_action_handle_all(platform);
- nm_assert(seq_result);
+ nm_assert(seq_result != WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
} while (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_FAILED_RESYNC
&& ++try_count < RESYNC_RETRIES);
@@ -9975,7 +9975,7 @@ qdisc_add(NMPlatform *platform, NMPNlmFlags flags, const NMPlatformQdisc *qdisc)
delayed_action_handle_all(platform);
- nm_assert(seq_result);
+ nm_assert(seq_result != WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
} while (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_FAILED_RESYNC
&& ++try_count < RESYNC_RETRIES);
@@ -10043,7 +10043,7 @@ tc_delete(NMPlatform *platform,
delayed_action_handle_all(platform);
- nm_assert(seq_result);
+ nm_assert(seq_result != WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
} while (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_FAILED_RESYNC
&& ++try_count < RESYNC_RETRIES);
@@ -10099,7 +10099,7 @@ tfilter_add(NMPlatform *platform, NMPNlmFlags flags, const NMPlatformTfilter *tf
delayed_action_handle_all(platform);
- nm_assert(seq_result);
+ nm_assert(seq_result != WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN);
_NMLOG(seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK ? LOGL_DEBUG : LOGL_WARN,
"do-add-tfilter: %s",