mirror of
https://github.com/coreutils/coreutils.git
synced 2025-01-27 02:23:35 +08:00
(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:
parent
da0732da37
commit
4e2bc789ab
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user