From 3e391882aa38108e1227fa2734899aaeb6450800 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 7 Nov 2000 15:35:15 +0000 Subject: [PATCH] (setusershell): Use rewind rather than fseek/fseeko, to avoid configuration hassles with fseeko. Don't bother opening SHELLS_FILE if shellstream is NULL; it's not necessary. --- lib/getusershell.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/getusershell.c b/lib/getusershell.c index 75163ac26f..93d5e438ef 100644 --- a/lib/getusershell.c +++ b/lib/getusershell.c @@ -100,16 +100,8 @@ void setusershell () { default_index = 0; - if (shellstream == NULL) - shellstream = fopen (SHELLS_FILE, "r"); - else - { -#ifdef HAVE_FSEEKO - fseeko (shellstream, 0, 0); -#else - fseek (shellstream, 0L, 0); -#endif - } + if (shellstream) + rewind (shellstream); } /* Close the shells file. */ -- 2.30.2