This commit is contained in:
Your Name 2023-12-26 22:01:04 +03:00
parent eabba8f4ea
commit d7047ceb1e
2 changed files with 5 additions and 6 deletions

View File

@ -109,8 +109,7 @@ int PrintColors(const char *title, const FETCH fetch) {
} }
int Blank(const char *title, const FETCH fetch) { int Blank(const char *title, const FETCH fetch) {
UNUSED(title); printf("%s%s%s", fetch.color, title, fetch.font_color);
UNUSED(fetch);
return 0; return 0;
} }
@ -193,11 +192,11 @@ int GetMem(const char *title, const FETCH fetch) {
return 1; return 1;
off_t unused = 0, total = 0, available = 0; off_t unused = 0, total = 0, available = 0;
if (fscanf(fp, "MemTotal: %ju kB\nMemFree: %ju kB\nMemAvailable: %ju kB", &total, &unused, &available) < 0) if (fscanf(fp, "MemTotal: %lu kB\nMemFree: %lu kB\nMemAvailable: %lu kB", &total, &unused, &available) < 0)
return 1; return 1;
UNUSED(unused); UNUSED(unused);
printf("%s%s%s%jumb / %jumb", fetch.color, title, fetch.font_color, (uintmax_t)(total - available) / 1024, (uintmax_t)total / 1024); printf("%s%s%s%lumb / %lumb", fetch.color, title, fetch.font_color, (uintmax_t)(total - available) / 1024, (uintmax_t)total / 1024);
fclose(fp); fclose(fp);
return 0; return 0;