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:
8839f37
)
(get_line): Report error right away if I/O fails,
author
Jim Meyering
<jim@meyering.net>
Tue, 23 Sep 2003 21:57:52 +0000
(21:57 +0000)
committer
Jim Meyering
<jim@meyering.net>
Tue, 23 Sep 2003 21:57:52 +0000
(21:57 +0000)
so that the proper errno value is used.
src/join.c
patch
|
blob
|
history
diff --git
a/src/join.c
b/src/join.c
index e82b66fe2ba8191e4ef2af22f8b66fe7ee9d5db1..b4d1cbb86dc2a963149d953010206eeb105ff057 100644
(file)
--- a/
src/join.c
+++ b/
src/join.c
@@
-261,6
+261,8
@@
get_line (FILE *fp, struct line *line)
if (! readlinebuffer (&line->buf, fp))
{
+ if (ferror (fp))
+ error (EXIT_FAILURE, errno, _("read error"));
free (line->buf.buffer);
line->buf.buffer = NULL;
return 0;