diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-09-11 09:57:25 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-09-11 09:57:25 -0700 |
commit | 1651502a43502da5ebbbfbd50b9f3cf0c709e8f8 (patch) | |
tree | 0aff4648f584fbaa5df7a516110bacb125f7c956 | |
parent | b367ca379ad97763f28a41f601680c376c3de040 (diff) | |
download | xorg-app-xauth-1651502a43502da5ebbbfbd50b9f3cf0c709e8f8.tar.gz |
Remove unnecessary casts from malloc() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | process.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -413,7 +413,7 @@ read_numeric(FILE *fp) { Xauth *auth; - auth = (Xauth *) malloc (sizeof (Xauth)); + auth = malloc (sizeof (Xauth)); if (!auth) goto bad; auth->family = 0; auth->address = NULL; @@ -469,7 +469,7 @@ read_auth_entries(FILE *fp, Bool numeric, AuthList **headp, AuthList **tailp) n = 0; /* put all records into linked list */ while ((auth = ((*readfunc) (fp))) != NULL) { - AuthList *l = (AuthList *) malloc (sizeof (AuthList)); + AuthList *l = malloc (sizeof (AuthList)); if (!l) { fprintf (stderr, "%s: unable to alloc entry reading auth file\n", @@ -956,7 +956,7 @@ bintohex(unsigned int len, const char *bindata) char *hexdata, *starthex; /* two chars per byte, plus null termination */ - starthex = hexdata = (char *)malloc(2*len + 1); + starthex = hexdata = malloc((2 * len) + 1); if (!hexdata) return NULL; @@ -1227,7 +1227,7 @@ copyAuth(Xauth *auth) { Xauth *a; - a = (Xauth *)malloc(sizeof(Xauth)); + a = malloc(sizeof(Xauth)); if (a == NULL) { return NULL; } |