projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0889c6
)
(next_file): Don't assume fopen cannot return stdin.
author
Jim Meyering
<jim@meyering.net>
Mon, 24 Oct 2005 07:18:18 +0000
(07:18 +0000)
committer
Jim Meyering
<jim@meyering.net>
Mon, 24 Oct 2005 07:18:18 +0000
(07:18 +0000)
src/expand.c
patch
|
blob
|
history
diff --git
a/src/expand.c
b/src/expand.c
index 863aec933c5863b6e379fa5450cc8cbd7111fdf8..bf857b0e4544dacb2d437c4079e96f2d228f0ade 100644
(file)
--- a/
src/expand.c
+++ b/
src/expand.c
@@
-235,7
+235,7
@@
next_file (FILE *fp)
error (0, errno, "%s", prev_file);
exit_status = EXIT_FAILURE;
}
- if (
fp == stdin
)
+ if (
STREQ (prev_file, "-")
)
clearerr (fp); /* Also clear EOF. */
else if (fclose (fp) != 0)
{
@@
-246,7
+246,7
@@
next_file (FILE *fp)
while ((file = *file_list++) != NULL)
{
- if (
file[0] == '-' && file[1] == '\0'
)
+ if (
STREQ (file, "-")
)
{
have_read_stdin = true;
prev_file = file;