From: Jim Meyering Date: Tue, 7 Nov 2000 15:35:15 +0000 (+0000) Subject: (setusershell): Use rewind rather than X-Git-Tag: FILEUTILS-4_0_32~45 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=4e2bc789ab5be94f151dea55ba4395218c4f5871;p=thirdparty%2Fcoreutils.git (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. --- 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. */