From fd1b9e6cfc22823d980b434f9908d20f2565972a Mon Sep 17 00:00:00 2001 From: LukeHuckman Date: Thu, 24 Jun 2021 04:17:28 +0800 Subject: [PATCH] Code cleanup --- uwufetch.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/uwufetch.c b/uwufetch.c index f4ebbc7..0395be0 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -338,7 +338,8 @@ void print_info() #else uptime = sys.uptime; #endif - switch (uptime) { + switch (uptime) + { case 0 ... 3599: printf("\033[18C%s%sUWUPTIME %s%lim\n", NORMAL, BOLD, NORMAL, uptime / 60 % 60); @@ -458,10 +459,8 @@ void get_info() meminfo = popen("LANG=EN_us free -m 2> /dev/null", "r"); while (fgets(line, sizeof(line), meminfo)) - { // free command prints like this: "Mem:" total used free shared buff/cache available sscanf(line, "Mem: %d %d", &ram_total, &ram_used); - } fclose(meminfo); #else //wmic OS get FreePhysicalMemory