From: Andrew Bays Date: Tue, 31 Jul 2018 12:17:20 +0000 (-0400) Subject: Fix implicit declaration X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4a74d2e71912661dfb74e1387fb29c81432a4bf7;p=collectd.git Fix implicit declaration --- diff --git a/src/ovs_stats.c b/src/ovs_stats.c index 376f0ad3..da747896 100644 --- a/src/ovs_stats.c +++ b/src/ovs_stats.c @@ -304,6 +304,21 @@ static void ovs_stats_submit_interfaces(bridge_list_t *bridge, } } +static int ovs_stats_get_port_stat_value(port_list_t *port, + iface_counter index) { + if (port == NULL) + return 0; + + int value = 0; + + for (interface_list_t *iface = port->iface; iface != NULL; + iface = iface->next) { + value = value + iface->stats[index]; + } + + return value; +} + static void ovs_stats_submit_port(bridge_list_t *bridge, port_list_t *port) { char devname[PORT_NAME_SIZE_MAX * 2]; @@ -417,21 +432,6 @@ static port_list_t *ovs_stats_get_port(const char *uuid) { return NULL; } -static int ovs_stats_get_port_stat_value(port_list_t *port, - iface_counter index) { - if (port == NULL) - return 0; - - int value = 0; - - for (interface_list_t *iface = port->iface; iface != NULL; - iface = iface->next) { - value = value + iface->stats[index]; - } - - return value; -} - static port_list_t *ovs_stats_get_port_by_interface_uuid(const char *uuid) { if (uuid == NULL) return NULL;