From d0c5d7be5b17a2c5bd9f27ffbb66d94f20bfd335 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 6 Jul 2025 03:05:07 +0200 Subject: [PATCH] Minor, constify Signed-off-by: Joachim Wiberg --- src/mount.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mount.c b/src/mount.c index 30e83b9e..df0389d6 100644 --- a/src/mount.c +++ b/src/mount.c @@ -41,7 +41,7 @@ * and regular filesystems that can be safely unmounted before we do * swapoff, and remount / as read-only, respectively. */ -static int is_protected(char *dir) +static int is_protected(const char *dir) { size_t i; char *protected_mnts[] = { @@ -112,7 +112,7 @@ static int unmount(const char *target) void unmount_tmpfs(void) { - struct mntent *mnt; + const struct mntent *mnt; FILE *fp = NULL; while ((mnt = iterator("/proc/mounts", &fp))) { @@ -123,7 +123,7 @@ void unmount_tmpfs(void) void unmount_regular(void) { - struct mntent *mnt; + const struct mntent *mnt; FILE *fp = NULL; while ((mnt = iterator("/proc/mounts", &fp))) {