X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fapple_sensors.c;fp=src%2Fapple_sensors.c;h=48fbcb91e53117832fc26160df4f8ecd4fa96947;hb=2761915bed8c6caea41018be3e675aa712cc0b0a;hp=1c72dda5fda9691e50b9fee5324225f323a153ee;hpb=cd2238b8b4f4ecd80c45862b5aeed3d3d73eddfe;p=collectd.git diff --git a/src/apple_sensors.c b/src/apple_sensors.c index 1c72dda5..48fbcb91 100644 --- a/src/apple_sensors.c +++ b/src/apple_sensors.c @@ -114,8 +114,6 @@ static int as_read (void) char inst[128]; int value_int; double value_double; - int i; - if (!io_master_port || (io_master_port == MACH_PORT_NULL)) return (-1); @@ -170,7 +168,7 @@ static int as_read (void) 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;