summaryrefslogtreecommitdiff
path: root/ld/ldlex.l
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2002-01-25 13:04:32 +0000
committerAndreas Jaeger <aj@suse.de>2002-01-25 13:04:32 +0000
commitf57e53412af85b98eff424175be800ceb517cc0a (patch)
tree7f104fab44c233b8934fece41bfeb6f6260158bb /ld/ldlex.l
parenta252dcff0cb4fd07395ea08b4c6518e1f087c5ec (diff)
downloadbinutils-redhat-f57e53412af85b98eff424175be800ceb517cc0a.tar.gz
* ldlex.l (yy_input): Correct error check.
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r--ld/ldlex.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/ldlex.l b/ld/ldlex.l
index 9f127f96d5..0b15ca2fab 100644
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -596,7 +596,7 @@ yy_input (buf, result, max_size)
if (yyin)
{
*result = fread ((char *) buf, 1, max_size, yyin);
- if (*result < 0)
+ if (*result < max_size && ferror (yyin))
einfo ("%F%P: read in flex scanner failed\n");
}
}