commit fce6a66354f0ac5fa2c54374a0a927f792e107fa
Author: Theo Le Ninivin <[email protected]>
Date: Thu Dec 31 12:36:05 2015 +0100
Correct the return type of getbattery
Additionally corrected a few whitespace inconsistencies.
diff --git a/dwm.suckless.org/dwmstatus/profil-dwmstatus-1.0.c
b/dwm.suckless.org/dwmstatus/profil-dwmstatus-1.0.c
index 1d619c3..e016f2c 100644
--- 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.
");
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");