]> gcc.gnu.org Git - gcc.git/commitdiff
(xrealloc): Handle 0 passed as BLOCK.
authorRichard Stallman <rms@gnu.org>
Mon, 27 Sep 1993 23:56:36 +0000 (23:56 +0000)
committerRichard Stallman <rms@gnu.org>
Mon, 27 Sep 1993 23:56:36 +0000 (23:56 +0000)
From-SVN: r5492

gcc/bi-lexer.c

index 954638a2eae3902d7a1fded819af29cf961b2d82..7bfc57e848de4abac768e6b71b5810a5c77a6888 100644 (file)
@@ -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)
     {
This page took 0.05624 seconds and 5 git commands to generate.