sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit fce6a66354f0ac5fa2c54374a0a927f792e107fa
parent ff1bd37225d0d5f896b819c4a9e1aa0391fc8b2a
Author: Theo Le Ninivin <theo.leninivin@kaufda.de>
Date:   Thu, 31 Dec 2015 12:36:05 +0100

Correct the return type of getbattery

Additionally corrected a few whitespace inconsistencies.

Diffstat:
Mdwm.suckless.org/dwmstatus/profil-dwmstatus-1.0.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dwm.suckless.org/dwmstatus/profil-dwmstatus-1.0.c b/dwm.suckless.org/dwmstatus/profil-dwmstatus-1.0.c @@ -18,7 +18,7 @@ void setstatus(char *str) { float getfreq(char *file) { FILE *fd; - char *freq; + char *freq; float ret; freq = malloc(10); @@ -55,11 +55,11 @@ char *getdatetime() { fprintf(stderr, "strftime is 0.\n"); exit(1); } - + return buf; } -int getbattery() { +float getbattery() { FILE *fd; int energy_now, energy_full, voltage_now; @@ -107,7 +107,7 @@ int main(void) { if((status = malloc(200)) == NULL) exit(1); - + for (;;sleep(1)) { cpu0 = getfreq("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq");