projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f68ccb9
)
(setusershell): Use rewind rather than
author
Jim Meyering
<jim@meyering.net>
Tue, 7 Nov 2000 15:35:15 +0000
(15:35 +0000)
committer
Jim Meyering
<jim@meyering.net>
Tue, 7 Nov 2000 15:35:15 +0000
(15:35 +0000)
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
patch
|
blob
|
history
diff --git
a/lib/getusershell.c
b/lib/getusershell.c
index 75163ac26f9e35268de4a0c739a39be4e4381dd0..93d5e438ef58667b820d71a55f655f95710920b5 100644
(file)
--- 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. */