From 0e6ed8369841bca37fd1d8512d9235348e04a411 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 19 Dec 2023 09:51:55 +0100 Subject: [PATCH] src/ovs_stats.c: Importing changes from `main`. Changes: dcd22696ebeb4556ed172b0253b90d38bebfc742 use derive_t instead of int inside ovs_stats_get_port_stat_value 91a642385e2d068d106aa5c307de968f8b33add5 bug#3924 fix --- src/ovs_stats.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ovs_stats.c b/src/ovs_stats.c index e22e851e2..aafc84f09 100644 --- a/src/ovs_stats.c +++ b/src/ovs_stats.c @@ -371,12 +371,12 @@ static void ovs_stats_submit_interfaces(port_list_t *port) { } } -static int ovs_stats_get_port_stat_value(port_list_t *port, - iface_counter index) { +static derive_t ovs_stats_get_port_stat_value(port_list_t *port, + iface_counter index) { if (port == NULL) return 0; - int value = 0; + derive_t value = 0; for (interface_list_t *iface = port->iface; iface != NULL; iface = iface->next) { @@ -1090,8 +1090,8 @@ static int ovs_stats_del_interface(const char *uuid) { interface_list_t *prev_iface = NULL; for (interface_list_t *iface = port->iface; iface != NULL; - iface = port->iface) { - if (strncmp(iface->iface_uuid, uuid, strlen(iface->iface_uuid))) { + iface = iface->next) { + if (!strncmp(iface->iface_uuid, uuid, strlen(iface->iface_uuid))) { interface_list_t *del = iface; -- 2.47.2