summaryrefslogtreecommitdiff
path: root/components/battery.c
diff options
context:
space:
mode:
authorAaron Marcher <me@drkhsh.at>2018-07-08 17:42:58 +0200
committerAaron Marcher <me@drkhsh.at>2018-07-08 17:42:58 +0200
commit96ddf4e1dee808d6ae8162fc1a13126a3d4c77dc (patch)
tree75f6d95fc7bbe3464c5f47574ab36a7514d0382e /components/battery.c
parentc93971748cb4771aec25aee6e8ff5b7bbb1aacf3 (diff)
Consistency with 80 char limit and breaks
Diffstat (limited to 'components/battery.c')
-rw-r--r--components/battery.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/components/battery.c b/components/battery.c
index 79d16c2..1178f20 100644
--- a/components/battery.c
+++ b/components/battery.c
@@ -33,8 +33,7 @@
char path[PATH_MAX];
if (esnprintf(path, sizeof(path),
- "/sys/class/power_supply/%s/capacity",
- bat) < 0) {
+ "/sys/class/power_supply/%s/capacity", bat) < 0) {
return NULL;
}
if (pscanf(path, "%d", &perc) != 1) {
@@ -58,8 +57,7 @@
char path[PATH_MAX], state[12];
if (esnprintf(path, sizeof(path),
- "/sys/class/power_supply/%s/status",
- bat) < 0) {
+ "/sys/class/power_supply/%s/status", bat) < 0) {
return NULL;
}
if (pscanf(path, "%12s", state) != 1) {
@@ -82,8 +80,7 @@
char path[PATH_MAX], state[12];
if (esnprintf(path, sizeof(path),
- "/sys/class/power_supply/%s/status",
- bat) < 0) {
+ "/sys/class/power_supply/%s/status", bat) < 0) {
return NULL;
}
if (pscanf(path, "%12s", state) != 1) {
@@ -91,8 +88,8 @@
}
if (!pick(bat, "/sys/class/power_supply/%s/charge_now",
- "/sys/class/power_supply/%s/energy_now",
- path, sizeof(path)) ||
+ "/sys/class/power_supply/%s/energy_now", path,
+ sizeof(path)) ||
pscanf(path, "%ju", &charge_now) < 0) {
return NULL;
}