diff --git a/src/apple_sensors.c b/src/apple_sensors.c
index 19d5a49f31731ead712a4d78409bdd87b492007e..48fbcb91e53117832fc26160df4f8ecd4fa96947 100644 (file)
--- a/src/apple_sensors.c
+++ b/src/apple_sensors.c
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
static int as_init (void)
{
kern_return_t status;
-
+
if (io_master_port != MACH_PORT_NULL)
{
mach_port_deallocate (mach_task_self (),
char inst[128];
int value_int;
double value_double;
- int i;
-
if (!io_master_port || (io_master_port == MACH_PORT_NULL))
return (-1);
kCFStringEncodingASCII))
continue;
inst[sizeof (inst) - 1] = '\0';
- for (i = 0; i < 128; i++)
+ for (int i = 0; i < 128; i++)
{
if (inst[i] == '\0')
break;