From: Richard Stallman Date: Wed, 6 Oct 1993 22:54:04 +0000 (+0000) Subject: (xmalloc, xrealloc): Cast the result of malloc, realloc. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e4f316dbfc784ec94dd573ce29ca9390fe6f202e;p=gcc.git (xmalloc, xrealloc): Cast the result of malloc, realloc. From-SVN: r5650 --- diff --git a/gcc/bi-lexer.c b/gcc/bi-lexer.c index 5e17d783dad..d631fb60cd8 100644 --- a/gcc/bi-lexer.c +++ b/gcc/bi-lexer.c @@ -33,7 +33,7 @@ static char * xmalloc (nbytes) int nbytes; { - char *tmp = malloc (nbytes); + char *tmp = (char *) malloc (nbytes); if (!tmp) { @@ -53,7 +53,9 @@ xrealloc (block, nbytes) char *block; int nbytes; { - char *tmp = block ? realloc (block, nbytes) : malloc (nbytes); + char *tmp = (block + ? (char *) realloc (block, nbytes) + : (char *) malloc (nbytes)); if (!tmp) {