diff options
author | Jim Meyering <jim@meyering.net> | 2000-11-07 15:35:15 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-11-07 15:35:15 +0000 |
commit | 4e2bc789ab5be94f151dea55ba4395218c4f5871 (patch) | |
tree | 789fb12207eb38eb12ff45ff2094bc548f121ed2 | |
parent | da0732da37f02057f03e32c31a8d30d8b9a6da98 (diff) | |
download | coreutils-4e2bc789ab5be94f151dea55ba4395218c4f5871.tar.xz |
(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.
-rw-r--r-- | lib/getusershell.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/getusershell.c b/lib/getusershell.c index 75163ac26..93d5e438e 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. */ |