From 96ddf4e1dee808d6ae8162fc1a13126a3d4c77dc Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Sun, 8 Jul 2018 17:42:58 +0200 Subject: Consistency with 80 char limit and breaks --- components/battery.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'components/battery.c') 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; } -- cgit v1.2.3