cleanups and fixes, thanks to cppcheck and gcc -Wextra

This commit is contained in:
Hisham Muhammad
2011-10-25 00:05:46 +00:00
parent 75080ce79d
commit d1b1cbc757
8 changed files with 21 additions and 27 deletions

View File

@ -22,7 +22,7 @@ static void UptimeMeter_setValues(Meter* this, char* buffer, int len) {
double uptime = 0;
FILE* fd = fopen(PROCDIR "/uptime", "r");
if (fd) {
fscanf(fd, "%lf", &uptime);
fscanf(fd, "%64lf", &uptime);
fclose(fd);
}
int totalseconds = (int) ceil(uptime);