merge from gcc

This commit is contained in:
DJ Delorie 2003-06-05 17:03:32 +00:00
parent 36c3ae2457
commit 54c60684a4
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2003-06-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR other/10810
* test-demangle.c (getline): Fix fence-post error.
2003-06-03 Nick Clifton <nickc@redhat.com> 2003-06-03 Nick Clifton <nickc@redhat.com>
* asprintf.c: Change comment to note that -1 is returned upon * asprintf.c: Change comment to note that -1 is returned upon

View file

@ -65,7 +65,7 @@ getline(buf)
line: copy this line into the buffer and return. */ line: copy this line into the buffer and return. */
while (c != EOF && c != '\n') while (c != EOF && c != '\n')
{ {
if (count >= alloc) if (count + 1 >= alloc)
{ {
alloc *= 2; alloc *= 2;
data = xrealloc (data, alloc); data = xrealloc (data, alloc);