(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.
This commit is contained in:
Jim Meyering 2000-11-07 15:35:15 +00:00
parent da0732da37
commit 4e2bc789ab

View File

@ -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. */