diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-05 09:42:33 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-05 09:47:01 -0800 |
commit | 639071ff3446b0df53078be1ff5820c812313aa7 (patch) | |
tree | e0d4cf1692c44d3bfc17f06d7194fd9c7dc9459a /include.c | |
parent | 1b5e7ee6483415d7093f3d5395c4832fa69f0a28 (diff) |
Remove unnecessary casts from malloc/realloc calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'include.c')
-rw-r--r-- | include.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -178,10 +178,8 @@ included_by(struct inclist *ip, struct inclist *newfile) * If it is already on the list, don't stick it on again. */ if (ip->i_list == NULL) { - ip->i_list = (struct inclist **) - malloc(sizeof(struct inclist *) * ++ip->i_listlen); - ip->i_merged = (boolean *) - malloc(sizeof(boolean) * ip->i_listlen); + ip->i_list = malloc(sizeof(struct inclist *) * ++ip->i_listlen); + ip->i_merged = malloc(sizeof(boolean) * ip->i_listlen); } else { for (i=0; i<ip->i_listlen; i++) if (ip->i_list[ i ] == newfile) { @@ -205,9 +203,9 @@ included_by(struct inclist *ip, struct inclist *newfile) } return; } - ip->i_list = (struct inclist **) realloc(ip->i_list, + ip->i_list = realloc(ip->i_list, sizeof(struct inclist *) * ++ip->i_listlen); - ip->i_merged = (boolean *) + ip->i_merged = realloc(ip->i_merged, sizeof(boolean) * ip->i_listlen); } ip->i_list[ ip->i_listlen-1 ] = newfile; |