X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnut.c;h=b5c6b41b6522142aba73716ed36b5a05e4886608;hb=6fc6255c95b966014ee02a2a37666b2c4880ff8d;hp=ee96863b914f28ebd992315f9453b55a7dced428;hpb=a5377cf935630082f2eac2e5f4a538844cc06c8d;p=collectd.git diff --git a/src/nut.c b/src/nut.c index ee96863b..b5c6b41b 100644 --- a/src/nut.c +++ b/src/nut.c @@ -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++;