From a1c3672f1295e35976b874e4922186e1ea5fb24d Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Mon, 27 Sep 1993 23:56:36 +0000 Subject: (xrealloc): Handle 0 passed as BLOCK. From-SVN: r5492 --- gcc/bi-lexer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/bi-lexer.c b/gcc/bi-lexer.c index 954638a..7bfc57e 100644 --- a/gcc/bi-lexer.c +++ b/gcc/bi-lexer.c @@ -56,7 +56,7 @@ xrealloc (block, nbytes) char *block; int nbytes; { - char *tmp = realloc (block, nbytes); + char *tmp = block ? realloc (block, nbytes) : malloc (nbytes); if (!tmp) { -- cgit v1.1