X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fnut.c;h=b5c6b41b6522142aba73716ed36b5a05e4886608;hb=13009ee6db333a1dc538c09fc5aafb2446db9b39;hp=ee96863b914f28ebd992315f9453b55a7dced428;hpb=063a5e75b36173e89ffa18d32d47509f6ef968ec;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++;