X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnut.c;h=b5c6b41b6522142aba73716ed36b5a05e4886608;hb=a349e06f0c4e2c853eced8a2621f52ee712b6e0c;hp=17eb1b9abc347b79bafb42454aa38956960f43eb;hpb=b5a33aab585aabef83c79bf3261092ca901edf9c;p=collectd.git diff --git a/src/nut.c b/src/nut.c index 17eb1b9a..b5c6b41b 100644 --- a/src/nut.c +++ b/src/nut.c @@ -25,10 +25,10 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" -#include #include #if HAVE_UPSCONN_T @@ -248,7 +248,6 @@ static int nut_read_one (nut_ups_t *ups) static int nut_read (void) { - nut_ups_t *ups; int success = 0; pthread_mutex_lock (&read_lock); @@ -259,7 +258,7 @@ static int nut_read (void) if (success != 0) return (0); - for (ups = upslist_head; ups != NULL; ups = ups->next) + for (nut_ups_t *ups = upslist_head; ups != NULL; ups = ups->next) if (nut_read_one (ups) == 0) success++;