From c8030d2b96170970b607f2a28da37b43b70e5274 Mon Sep 17 00:00:00 2001 From: wollman Date: Mon, 10 Apr 1995 18:57:08 +0000 Subject: Fix initialization error that caused `mount -vat' to behave unexpectedly in certain circumstances. Fixes PR #182. Submitted by: Andrew Atrens --- sbin/umount/umount.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sbin') 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); } -- cgit v1.1