From c7f9499c249ebec9e3020df178160844c4a072bb Mon Sep 17 00:00:00 2001 From: TheDarkBug Date: Tue, 8 Mar 2022 21:28:42 +0100 Subject: [PATCH] Fixed some warnings --- uwufetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uwufetch.c b/uwufetch.c index a846e64..4657a7e 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -253,7 +253,7 @@ int pkgman(struct info* user_info) unsigned int pkg_count = 0; if (fscanf(fp, "%u", &pkg_count) == 3) continue; // if a number is found, continue the loop - fclose(fp); + pclose(fp); // adding a package manager with its package count to user_info->pkgman_name total += pkg_count; @@ -1007,7 +1007,7 @@ struct info get_info() FILE* whoami = popen("whoami", "r"); if (fscanf(whoami, "%s", user_info.user) == 3) sprintf(user_info.user, "unknown"); - fclose(whoami); + pclose(whoami); // model name model_fp = popen("getprop ro.product.model", "r"); while (fgets(buffer, sizeof(buffer), model_fp) && !sscanf(buffer, "%[^\n]", user_info.model))