projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5af990
)
(xmalloc, xrealloc): Cast the result of malloc, realloc.
author
Richard Stallman
<rms@gnu.org>
Wed, 6 Oct 1993 22:54:04 +0000
(22:54 +0000)
committer
Richard Stallman
<rms@gnu.org>
Wed, 6 Oct 1993 22:54:04 +0000
(22:54 +0000)
From-SVN: r5650
gcc/bi-lexer.c
patch
|
blob
|
history
diff --git
a/gcc/bi-lexer.c
b/gcc/bi-lexer.c
index 5e17d783dad9065f13b5a1654995ea2ac1a1e312..d631fb60cd84dd7644b223c56b83e3abb3bf65e5 100644
(file)
--- 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)
{