X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbattery_statefs.c;h=d2c1ed9d623a1da225eeb6edca1bd5c6e3ac0b95;hb=e10ce37462d3002c296efe1b5b955a0a498d1f3b;hp=4b9baf4255758792498f154734feec1ce755453a;hpb=51d29979b01ae0316597898f0e25d4bab7fd7d81;p=collectd.git diff --git a/src/battery_statefs.c b/src/battery_statefs.c index 4b9baf42..d2c1ed9d 100644 --- a/src/battery_statefs.c +++ b/src/battery_statefs.c @@ -44,9 +44,9 @@ SOFTWARE. **/ -#include "common.h" -#include "plugin.h" #include "collectd.h" +#include "plugin.h" +#include "utils/common/common.h" #include @@ -87,9 +87,9 @@ int battery_read_statefs(void) { } struct { - char *path; - char *type; - char *type_instance; + const char *path; + const char *type; + const char *type_instance; gauge_t factor; } metrics[] = { {STATEFS_ROOT "Current", "current", NULL, 1e-6}, // from uA to A @@ -115,8 +115,8 @@ int battery_read_statefs(void) { if (success == 0) { ERROR("battery plugin: statefs backend: none of the statistics are " "available"); - return (-1); + return -1; } - return (0); + return 0; }