diff --git a/src/nut.c b/src/nut.c
index 17eb1b9abc347b79bafb42454aa38956960f43eb..b5c6b41b6522142aba73716ed36b5a05e4886608 100644 (file)
--- a/src/nut.c
+++ b/src/nut.c
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
-#include <pthread.h>
#include <upsclient.h>
#if HAVE_UPSCONN_T
static int nut_read (void)
{
- nut_ups_t *ups;
int success = 0;
pthread_mutex_lock (&read_lock);
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++;