diff options
| author | Paul Spooren | 2023-10-26 07:28:11 +0000 |
|---|---|---|
| committer | Daniel Golle | 2024-03-20 18:47:29 +0000 |
| commit | 428f40e7984f537096a7dbc418a100abaab04be5 (patch) | |
| tree | bf300ec9a7a07aaa9aa5b159ab54fd7e73470051 | |
| parent | 79f8cfa58ee7ec828a0fe3519ce696be42a81b2d (diff) | |
test commit fixing warnings
Signed-off-by: Paul Spooren <mail@aparcar.org>
| -rw-r--r-- | system.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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; |