Commit e4f316db by Richard Stallman

(xmalloc, xrealloc): Cast the result of malloc, realloc.

From-SVN: r5650
parent c5af9901
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment