projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1592 from rpv-tomsk/mysql-plugin-sort
[collectd.git]
/
src
/
battery.c
diff --git
a/src/battery.c
b/src/battery.c
index
9b060dd
..
b87739a
100644
(file)
--- a/
src/battery.c
+++ b/
src/battery.c
@@
-143,7
+143,7
@@
static void submit_capacity (char const *plugin_instance, /* {{{ */
} /* }}} void submit_capacity */
#if HAVE_IOKIT_PS_IOPOWERSOURCES_H || HAVE_IOKIT_IOKITLIB_H
} /* }}} void submit_capacity */
#if HAVE_IOKIT_PS_IOPOWERSOURCES_H || HAVE_IOKIT_IOKITLIB_H
-static double dict_get_double (CFDictionaryRef dict, char *key_string) /* {{{ */
+static double dict_get_double (CFDictionaryRef dict, c
onst c
har *key_string) /* {{{ */
{
double val_double;
long long val_int;
{
double val_double;
long long val_int;
@@
-556,7
+556,7
@@
static int read_acpi_full_capacity (char const *dir, /* {{{ */
ssnprintf (filename, sizeof (filename), "%s/%s/info", dir, power_supply);
fh = fopen (filename, "r");
ssnprintf (filename, sizeof (filename), "%s/%s/info", dir, power_supply);
fh = fopen (filename, "r");
- if (
(fh = fopen (filename, "r"))
== NULL)
+ if (
fh
== NULL)
return (errno);
/* last full capacity: 40090 mWh */
return (errno);
/* last full capacity: 40090 mWh */
@@
-615,7
+615,7
@@
static int read_acpi_callback (char const *dir, /* {{{ */
ssnprintf (filename, sizeof (filename), "%s/%s/state", dir, power_supply);
fh = fopen (filename, "r");
ssnprintf (filename, sizeof (filename), "%s/%s/state", dir, power_supply);
fh = fopen (filename, "r");
- if (
(fh = fopen (filename, "r"))
== NULL)
+ if (
fh
== NULL)
{
if ((errno == EAGAIN) || (errno == EINTR) || (errno == ENOENT))
return (0);
{
if ((errno == EAGAIN) || (errno == EINTR) || (errno == ENOENT))
return (0);