X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/acfa1f50c24add6b9a78d94af21f9350150fb9c2..e213b48122f1f8e8d837053324d9c891a67a38d2:/components/ram.c?ds=sidebyside diff --git a/components/ram.c b/components/ram.c index d2fbce9..91311ac 100644 --- a/components/ram.c +++ b/components/ram.c @@ -40,8 +40,8 @@ return NULL; } - return bprintf("%d", 100 * ((total - free) - - (buffers + cached)) / total); + return bprintf("%d", 100 * ((total - free) - (buffers + cached)) + / total); } const char * @@ -49,8 +49,8 @@ { uintmax_t total; - if (pscanf("/proc/meminfo", "MemTotal: %ju kB\n", - &total) != 1) { + if (pscanf("/proc/meminfo", "MemTotal: %ju kB\n", &total) + != 1) { return NULL; } @@ -80,7 +80,7 @@ #include #include - #define LOG1024 10 + #define LOG1024 10 #define pagetok(size, pageshift) (size_t)(size << (pageshift - LOG1024)) inline int