Merge branch 'collectd-5.7' into collectd-5.8
[collectd.git] / src / battery_statefs.c
index 4b9baf4..149512b 100644 (file)
@@ -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;
 }