diff options
author | Aaron Marcher <info@nulltime.net> | 2016-03-07 10:08:04 +0100 |
---|---|---|
committer | Aaron Marcher (drkhsh) <info@nulltime.net> | 2016-03-07 10:08:04 +0100 |
commit | 570ebe3496f2c87774d077f92fc4a1554b4b03bd (patch) | |
tree | 055430805c9b34c15b337987c97c0390928c66a7 | |
parent | cc85bcc4a4eea24e470e9e7cb778eb71674635fb (diff) |
variable names
-rw-r--r-- | slstatus.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -39,7 +39,7 @@ setstatus(char *str) char * battery() { - int batt_now, batt_full, batt_perc; + int battery_now, battery_full, battery_perc; FILE *fp; /* open battery now file */ @@ -49,7 +49,7 @@ battery() } /* read value */ - fscanf(fp, "%i", &batt_now); + fscanf(fp, "%i", &battery_now); /* close battery now file */ fclose(fp); @@ -61,16 +61,16 @@ battery() } /* read value */ - fscanf(fp, "%i", &batt_full); + fscanf(fp, "%i", &battery_full); /* close battery full file */ fclose(fp); /* calculate percent */ - batt_perc = batt_now / (batt_full / 100); + battery_perc = battery_now / (battery_full / 100); /* return batt_perc as string */ - return smprintf("%d%%", batt_perc); + return smprintf("%d%%", battery_perc); } /* cpu temperature */ |