diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-11-30 18:40:46 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-12-06 11:18:07 -0800 |
commit | a04a45cb94f7f569e6dd77df93258fa167d0a4ea (patch) | |
tree | 449089b4192273a91703035c5c62ead005788a66 /Xtrans.c | |
parent | a0bfb4fefd20b396e3d88eff0c60602fc436dad5 (diff) |
Remove unnecessary casts on malloc, calloc & free calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Diffstat (limited to 'Xtrans.c')
-rw-r--r-- | Xtrans.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -143,7 +143,7 @@ TRANS(FreeConnInfo) (XtransConnInfo ciptr) if (ciptr->port) free (ciptr->port); - free ((char *) ciptr); + free (ciptr); } @@ -939,7 +939,7 @@ TRANS(GetMyAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp, *familyp = ciptr->family; *addrlenp = ciptr->addrlen; - if ((*addrp = (Xtransaddr *) malloc (ciptr->addrlen)) == NULL) + if ((*addrp = malloc (ciptr->addrlen)) == NULL) { prmsg (1,"GetMyAddr: malloc failed\n"); return -1; @@ -959,7 +959,7 @@ TRANS(GetPeerAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp, *familyp = ciptr->family; *addrlenp = ciptr->peeraddrlen; - if ((*addrp = (Xtransaddr *) malloc (ciptr->peeraddrlen)) == NULL) + if ((*addrp = malloc (ciptr->peeraddrlen)) == NULL) { prmsg (1,"GetPeerAddr: malloc failed\n"); return -1; @@ -1128,7 +1128,7 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret, if (*count_ret > 0) { - if ((*ciptrs_ret = (XtransConnInfo *) malloc ( + if ((*ciptrs_ret = malloc ( *count_ret * sizeof (XtransConnInfo))) == NULL) { return -1; @@ -1226,7 +1226,7 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret, if (*count_ret > 0) { - if ((*ciptrs_ret = (XtransConnInfo *) malloc ( + if ((*ciptrs_ret = malloc ( *count_ret * sizeof (XtransConnInfo))) == NULL) { return -1; |