summaryrefslogtreecommitdiff
path: root/mount/mount_mntent.c
diff options
context:
space:
mode:
Diffstat (limited to 'mount/mount_mntent.c')
-rw-r--r--mount/mount_mntent.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/mount/mount_mntent.c b/mount/mount_mntent.c
index 08e5bf48..a1e34db0 100644
--- a/mount/mount_mntent.c
+++ b/mount/mount_mntent.c
@@ -27,13 +27,6 @@ skip_spaces(char *s) {
return s;
}
-static char *
-skip_nonspaces(char *s) {
- while (*s && !is_space_or_tab(*s))
- s++;
- return s;
-}
-
/*
* fstat'ing the file and allocating a buffer holding all of it
* may be a bad idea: if the file is /proc/mounts, the stat
@@ -126,17 +119,13 @@ my_getmntent (mntFILE *mfp) {
s = skip_spaces(buf);
} while (*s == '\0' || *s == '#');
- me.mnt_fsname = unmangle(s);
- s = skip_nonspaces(s);
+ me.mnt_fsname = unmangle(s, &s);
s = skip_spaces(s);
- me.mnt_dir = unmangle(s);
- s = skip_nonspaces(s);
+ me.mnt_dir = unmangle(s, &s);
s = skip_spaces(s);
- me.mnt_type = unmangle(s);
- s = skip_nonspaces(s);
+ me.mnt_type = unmangle(s, &s);
s = skip_spaces(s);
- me.mnt_opts = unmangle(s);
- s = skip_nonspaces(s);
+ me.mnt_opts = unmangle(s, &s);
s = skip_spaces(s);
if (isdigit(*s)) {