From: Sebastian Harl Date: Thu, 2 Oct 2008 12:54:06 +0000 (+0200) Subject: ipvs plugin: Use sizeof() instead of a constant. X-Git-Tag: collectd-4.4.4~19 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2daf122169d36fb7e0e3dbd0a5742a54ce2f20c9;p=collectd.git ipvs plugin: Use sizeof() instead of a constant. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- diff --git a/src/ipvs.c b/src/ipvs.c index 31e97415..2de28dd8 100644 --- a/src/ipvs.c +++ b/src/ipvs.c @@ -276,7 +276,7 @@ static void cipvs_submit_dest (char *pi, struct ip_vs_dest_entry *de) { char ti[DATA_MAX_NAME_LEN]; - if (0 != get_ti (de, ti, DATA_MAX_NAME_LEN)) + if (0 != get_ti (de, ti, sizeof (ti))) return; cipvs_submit_connections (pi, ti, stats.conns); @@ -294,7 +294,7 @@ static void cipvs_submit_service (struct ip_vs_service_entry *se) int i = 0; - if (0 != get_pi (se, pi, DATA_MAX_NAME_LEN)) + if (0 != get_pi (se, pi, sizeof (pi))) return; cipvs_submit_connections (pi, NULL, stats.conns);