From 428f40e7984f537096a7dbc418a100abaab04be5 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Thu, 26 Oct 2023 09:28:11 +0200 Subject: [PATCH] test commit fixing warnings Signed-off-by: Paul Spooren --- system.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/system.c b/system.c index 8df606f..21ec3cd 100644 --- a/system.c +++ b/system.c @@ -51,9 +51,8 @@ static const char *system_rootfs_type(void) { static char fstype[16] = { 0 }; char *mountstr = NULL, *mp = "/", *pos, *tmp; FILE *mounts; - ssize_t nread; size_t len = 0; - bool found; + bool found = false; if (initramfs) return "initramfs"; @@ -65,9 +64,7 @@ static const char *system_rootfs_type(void) { if (!mounts) return NULL; - while ((nread = getline(&mountstr, &len, mounts)) != -1) { - found = false; - + while (getline(&mountstr, &len, mounts) != -1) { pos = strchr(mountstr, ' '); if (!pos) continue; -- 2.30.2