Code

python plugin: Grab GIL before freeing callbacks. If their refcount reaches 0 Python...
[collectd.git] / src / apcups.c
index a1f238266bb9848cc71494713612f04c4423ae28..af5f24c70f2f2d1e5544a7a1c62cd7f880b27ba4 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "common.h"      /* rrd_update_file */
 #include "plugin.h"      /* plugin_register, plugin_submit */
-#include "configfile.h"  /* cf_register */
 
 #if HAVE_SYS_TYPES_H
 # include <sys/types.h>
@@ -381,10 +380,9 @@ static int apc_query_server (char const *node, char const *service,
 
 static int apcups_config (oconfig_item_t *ci)
 {
-       int i;
        _Bool persistent_conn_set = 0;
 
-       for (i = 0; i < ci->children_num; i++)
+       for (int i = 0; i < ci->children_num; i++)
        {
                oconfig_item_t *child = ci->children + i;