From da3bc2fc01c2443486ac1d241c4a09eaa71083c6 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Sat, 11 Nov 2023 12:11:50 +0100 Subject: treewide: do not cast calloc/malloc/realloc It is not required to cast the results of calloc, malloc, realloc, etc. Signed-off-by: Tobias Stoeckmann --- modules/pam_group/pam_group.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/pam_group') diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c index 2525e048..038306c7 100644 --- a/modules/pam_group/pam_group.c +++ b/modules/pam_group/pam_group.c @@ -87,7 +87,7 @@ read_field(const pam_handle_t *pamh, int fd, char **buf, int *from, int *state, /* is buf set ? */ if (! *buf) { - *buf = (char *) calloc(1, PAM_GROUP_BUFLEN+1); + *buf = calloc(1, PAM_GROUP_BUFLEN+1); if (! *buf) { pam_syslog(pamh, LOG_CRIT, "out of memory"); D(("no memory")); @@ -530,8 +530,7 @@ static int mkgrplist(pam_handle_t *pamh, char *buf, gid_t **list, int len) gid_t *tmp; D(("allocating new block")); - tmp = (gid_t *) realloc((*list) - , sizeof(gid_t) * (blks += GROUP_BLK)); + tmp = realloc((*list), sizeof(gid_t) * (blks += GROUP_BLK)); if (tmp != NULL) { (*list) = tmp; } else { -- cgit v1.2.3