diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2023-11-11 12:11:50 +0100 |
---|---|---|
committer | Dmitry V. Levin <github.dl@altlinux.org> | 2023-11-12 19:43:03 +0000 |
commit | da3bc2fc01c2443486ac1d241c4a09eaa71083c6 (patch) | |
tree | a35731c8f3ae9de23dce790ba12bc42204dda8ec /modules/pam_namespace/pam_namespace.c | |
parent | e3e3b06fbdb917eaff24e1a6860654b99b99faa0 (diff) | |
download | pam-da3bc2fc01c2443486ac1d241c4a09eaa71083c6.tar.gz pam-da3bc2fc01c2443486ac1d241c4a09eaa71083c6.tar.bz2 pam-da3bc2fc01c2443486ac1d241c4a09eaa71083c6.zip |
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 <tobias@stoeckmann.org>
Diffstat (limited to 'modules/pam_namespace/pam_namespace.c')
-rw-r--r-- | modules/pam_namespace/pam_namespace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c index 48690b8d..4d24d356 100644 --- a/modules/pam_namespace/pam_namespace.c +++ b/modules/pam_namespace/pam_namespace.c @@ -645,7 +645,7 @@ static int process_line(char *line, const char *home, const char *rhome, sstr = strchr(ustr, ','); poly->num_uids = count; - poly->uid = (uid_t *) malloc(count * sizeof (uid_t)); + poly->uid = malloc(count * sizeof (uid_t)); uidptr = poly->uid; if (uidptr == NULL) { goto erralloc; @@ -1295,7 +1295,7 @@ static int check_inst_parent(char *ipath, struct instance_data *idata) * admin explicitly instructs to ignore the instance parent * mode by the "ignore_instance_parent_mode" argument). */ - inst_parent = (char *) malloc(strlen(ipath)+1); + inst_parent = malloc(strlen(ipath)+1); if (!inst_parent) { pam_syslog(idata->pamh, LOG_CRIT, "Error allocating pathname string"); return PAM_SESSION_ERR; |