diff options
author | wollman <wollman@FreeBSD.org> | 1995-04-10 18:57:08 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1995-04-10 18:57:08 +0000 |
commit | c8030d2b96170970b607f2a28da37b43b70e5274 (patch) | |
tree | 9e0655c3f2d03586bdd3f117403cf5aa6ba2c1f3 | |
parent | 99573a4b9426059d9525d3995cdf9587720fcd2a (diff) | |
download | FreeBSD-src-c8030d2b96170970b607f2a28da37b43b70e5274.zip FreeBSD-src-c8030d2b96170970b607f2a28da37b43b70e5274.tar.gz |
Fix initialization error that caused `mount -vat' to behave unexpectedly
in certain circumstances. Fixes PR #182.
Submitted by: Andrew Atrens <atreand@statcan.ca>
-rw-r--r-- | sbin/umount/umount.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index 9059bab..24d7001 100644 --- a/sbin/umount/umount.c +++ b/sbin/umount/umount.c @@ -308,11 +308,14 @@ int selected(type) int type; { + int *tmp_typelist; + + tmp_typelist=typelist; /* If no type specified, it's always selected. */ - if (typelist == NULL) + if (tmp_typelist == NULL) return (1); - for (; *typelist != MOUNT_NONE; ++typelist) - if (type == *typelist) + for (; *tmp_typelist != MOUNT_NONE; ++tmp_typelist) + if (type == *tmp_typelist) return (which == IN_LIST ? 1 : 0); return (which == IN_LIST ? 0 : 1); } |