X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fipvs.c;h=92690e88e0098635a8cc56fe9c6191116b81082e;hb=4d370741101aeb037ae52f3529a4a0869e0dc08a;hp=354c7d35fbff544526e86be5c6c4a9a7b2a05261;hpb=a5377cf935630082f2eac2e5f4a538844cc06c8d;p=collectd.git diff --git a/src/ipvs.c b/src/ipvs.c index 354c7d35..92690e88 100644 --- a/src/ipvs.c +++ b/src/ipvs.c @@ -292,8 +292,6 @@ static void cipvs_submit_service (struct ip_vs_service_entry *se) char pi[DATA_MAX_NAME_LEN]; - size_t i; - if (0 != get_pi (se, pi, sizeof (pi))) { free (dests); @@ -304,7 +302,7 @@ static void cipvs_submit_service (struct ip_vs_service_entry *se) cipvs_submit_if (pi, "if_packets", NULL, stats.inpkts, stats.outpkts); cipvs_submit_if (pi, "if_octets", NULL, stats.inbytes, stats.outbytes); - for (i = 0; i < dests->num_dests; ++i) + for (size_t i = 0; i < dests->num_dests; ++i) cipvs_submit_dest (pi, &dests->entrytable[i]); free (dests); @@ -314,7 +312,6 @@ static void cipvs_submit_service (struct ip_vs_service_entry *se) static int cipvs_read (void) { struct ip_vs_get_services *services = NULL; - size_t i; if (sockfd < 0) return (-1); @@ -322,7 +319,7 @@ static int cipvs_read (void) if (NULL == (services = ipvs_get_services ())) return -1; - for (i = 0; i < services->num_services; ++i) + for (size_t i = 0; i < services->num_services; ++i) cipvs_submit_service (&services->entrytable[i]); free (services);