diff options
| author | Marcel Telka <marcel@telka.sk> | 2017-06-14 17:20:42 +0200 |
|---|---|---|
| committer | Richard Lowe <richlowe@richlowe.net> | 2017-06-19 13:09:11 -0400 |
| commit | a17ce84520dc4e972c913e0fa1d1545ddd22b55e (patch) | |
| tree | 943a03114a228d30274cec9c81a0cb6aa18805a2 /usr/src/lib/libidmap | |
| parent | 5c25b6f10367f6cb7b3d8b8bc7e374712eb977c2 (diff) | |
| download | illumos-joyent-a17ce84520dc4e972c913e0fa1d1545ddd22b55e.tar.gz | |
8392 Do not cast the return value of xdr_free()
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/lib/libidmap')
| -rw-r--r-- | usr/src/lib/libidmap/common/idmap_api.c | 48 | ||||
| -rw-r--r-- | usr/src/lib/libidmap/common/idmap_impl.h | 8 |
2 files changed, 28 insertions, 28 deletions
diff --git a/usr/src/lib/libidmap/common/idmap_api.c b/usr/src/lib/libidmap/common/idmap_api.c index ddfefc39c2..54ee78bfe4 100644 --- a/usr/src/lib/libidmap/common/idmap_api.c +++ b/usr/src/lib/libidmap/common/idmap_api.c @@ -234,7 +234,7 @@ out: _IDMAP_RESET_UDT_HANDLE(udthandle); } - (void) xdr_free(xdr_idmap_update_res, (caddr_t)&res); + xdr_free(xdr_idmap_update_res, (caddr_t)&res); errno = idmap_stat2errno(retcode); return (retcode); } @@ -414,9 +414,9 @@ idmap_udt_destroy(idmap_udt_handle_t *udthandle) { if (udthandle == NULL) return; - (void) xdr_free(xdr_idmap_update_batch, (caddr_t)&udthandle->batch); - (void) xdr_free(xdr_idmap_namerule, (caddr_t)&udthandle->error_rule); - (void) xdr_free(xdr_idmap_namerule, (caddr_t)&udthandle->conflict_rule); + xdr_free(xdr_idmap_update_batch, (caddr_t)&udthandle->batch); + xdr_free(xdr_idmap_namerule, (caddr_t)&udthandle->error_rule); + xdr_free(xdr_idmap_namerule, (caddr_t)&udthandle->conflict_rule); free(udthandle); } @@ -461,7 +461,7 @@ idmap_udt_add_namerule(idmap_udt_handle_t *udthandle, const char *windomain, errout: /* The batch should still be usable */ if (rule) - (void) xdr_free(xdr_idmap_namerule, (caddr_t)rule); + xdr_free(xdr_idmap_namerule, (caddr_t)rule); errno = idmap_stat2errno(retcode); return (retcode); } @@ -506,7 +506,7 @@ idmap_udt_rm_namerule(idmap_udt_handle_t *udthandle, boolean_t is_user, errout: if (rule) - (void) xdr_free(xdr_idmap_namerule, (caddr_t)rule); + xdr_free(xdr_idmap_namerule, (caddr_t)rule); errno = idmap_stat2errno(retcode); return (retcode); } @@ -565,9 +565,9 @@ idmap_iter_set_limit(idmap_iter_t *iter, uint64_t limit) * iter - iterator */ idmap_stat -idmap_iter_namerules(const char *windomain, - boolean_t is_user, boolean_t is_wuser, const char *winname, - const char *unixname, idmap_iter_t **iter) +idmap_iter_namerules(const char *windomain, boolean_t is_user, + boolean_t is_wuser, const char *winname, const char *unixname, + idmap_iter_t **iter) { idmap_iter_t *tmpiter; @@ -965,7 +965,7 @@ idmap_get_create(idmap_get_handle_t **gh) */ idmap_stat idmap_get_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, - int flag, uid_t *uid, idmap_stat *stat) + int flag, uid_t *uid, idmap_stat *stat) { return (idmap_getext_uidbysid(gh, sidprefix, rid, flag, uid, NULL, stat)); @@ -989,7 +989,7 @@ idmap_get_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, idmap_stat idmap_getext_uidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, - int flag, uid_t *uid, idmap_info *info, idmap_stat *stat) + int flag, uid_t *uid, idmap_info *info, idmap_stat *stat) { idmap_retcode retcode; idmap_mapping *mapping = NULL; @@ -1059,7 +1059,7 @@ errout: */ idmap_stat idmap_get_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, - int flag, gid_t *gid, idmap_stat *stat) + int flag, gid_t *gid, idmap_stat *stat) { return (idmap_getext_gidbysid(gh, sidprefix, rid, flag, gid, NULL, stat)); @@ -1083,7 +1083,7 @@ idmap_get_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, */ idmap_stat idmap_getext_gidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, - int flag, gid_t *gid, idmap_info *info, idmap_stat *stat) + int flag, gid_t *gid, idmap_info *info, idmap_stat *stat) { idmap_retcode retcode; @@ -1156,7 +1156,7 @@ errout: */ idmap_stat idmap_get_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, - int flag, uid_t *pid, int *is_user, idmap_stat *stat) + int flag, uid_t *pid, int *is_user, idmap_stat *stat) { return (idmap_getext_pidbysid(gh, sidprefix, rid, flag, pid, is_user, NULL, stat)); @@ -1183,7 +1183,7 @@ idmap_get_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, */ idmap_stat idmap_getext_pidbysid(idmap_get_handle_t *gh, char *sidprefix, idmap_rid_t rid, - int flag, uid_t *pid, int *is_user, idmap_info *info, idmap_stat *stat) + int flag, uid_t *pid, int *is_user, idmap_info *info, idmap_stat *stat) { idmap_retcode retcode; idmap_mapping *mapping = NULL; @@ -1255,7 +1255,7 @@ errout: */ idmap_stat idmap_get_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag, - char **sidprefix, idmap_rid_t *rid, idmap_stat *stat) + char **sidprefix, idmap_rid_t *rid, idmap_stat *stat) { return (idmap_getext_sidbyuid(gh, uid, flag, sidprefix, rid, NULL, stat)); @@ -1279,7 +1279,7 @@ idmap_get_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag, */ idmap_stat idmap_getext_sidbyuid(idmap_get_handle_t *gh, uid_t uid, int flag, - char **sidprefix, idmap_rid_t *rid, idmap_info *info, idmap_stat *stat) + char **sidprefix, idmap_rid_t *rid, idmap_info *info, idmap_stat *stat) { idmap_retcode retcode; @@ -1346,7 +1346,7 @@ errout: */ idmap_stat idmap_get_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag, - char **sidprefix, idmap_rid_t *rid, idmap_stat *stat) + char **sidprefix, idmap_rid_t *rid, idmap_stat *stat) { return (idmap_getext_sidbygid(gh, gid, flag, sidprefix, rid, NULL, stat)); @@ -1370,7 +1370,7 @@ idmap_get_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag, */ idmap_stat idmap_getext_sidbygid(idmap_get_handle_t *gh, gid_t gid, int flag, - char **sidprefix, idmap_rid_t *rid, idmap_info *info, idmap_stat *stat) + char **sidprefix, idmap_rid_t *rid, idmap_info *info, idmap_stat *stat) { idmap_retcode retcode; @@ -1569,7 +1569,7 @@ idmap_get_mappings(idmap_get_handle_t *gh) out: _IDMAP_RESET_GET_HANDLE(gh); - (void) xdr_free(xdr_idmap_ids_res, (caddr_t)&res); + xdr_free(xdr_idmap_ids_res, (caddr_t)&res); errno = idmap_stat2errno(retcode); return (retcode); } @@ -1583,7 +1583,7 @@ idmap_get_destroy(idmap_get_handle_t *gh) { if (gh == NULL) return; - (void) xdr_free(xdr_idmap_mapping_batch, (caddr_t)&gh->batch); + xdr_free(xdr_idmap_mapping_batch, (caddr_t)&gh->batch); if (gh->retlist) free(gh->retlist); free(gh); @@ -2105,7 +2105,7 @@ idmap_how_clear(idmap_how *how) */ idmap_stat idmap_getuidbywinname(const char *name, const char *domain, int flag, - uid_t *uid) + uid_t *uid) { idmap_retcode rc; int is_user = 1; @@ -2140,7 +2140,7 @@ idmap_getuidbywinname(const char *name, const char *domain, int flag, */ idmap_stat idmap_getgidbywinname(const char *name, const char *domain, int flag, - gid_t *gid) + gid_t *gid) { idmap_retcode rc; int is_user = 0; @@ -2176,7 +2176,7 @@ idmap_getgidbywinname(const char *name, const char *domain, int flag, */ idmap_stat idmap_getwinnamebypid(uid_t pid, int is_user, int flag, char **name, - char **domain) + char **domain) { idmap_retcode rc; int len; diff --git a/usr/src/lib/libidmap/common/idmap_impl.h b/usr/src/lib/libidmap/common/idmap_impl.h index 8dd4a7efb2..bcae8b6d8d 100644 --- a/usr/src/lib/libidmap/common/idmap_impl.h +++ b/usr/src/lib/libidmap/common/idmap_impl.h @@ -53,11 +53,11 @@ struct idmap_udt_handle { }; #define _IDMAP_RESET_UDT_HANDLE(uh) \ - (void) xdr_free(xdr_idmap_update_batch, (caddr_t)&uh->batch);\ + xdr_free(xdr_idmap_update_batch, (caddr_t)&uh->batch);\ uh->next = 0;\ uh->error_index = -1;\ - (void) xdr_free(xdr_idmap_namerule, (caddr_t)&uh->error_rule);\ - (void) xdr_free(xdr_idmap_namerule, (caddr_t)&uh->conflict_rule); + xdr_free(xdr_idmap_namerule, (caddr_t)&uh->error_rule);\ + xdr_free(xdr_idmap_namerule, (caddr_t)&uh->conflict_rule); typedef struct idmap_get_res { idmap_id_type idtype; @@ -78,7 +78,7 @@ struct idmap_get_handle { }; #define _IDMAP_RESET_GET_HANDLE(gh) \ - (void) xdr_free(xdr_idmap_mapping_batch, (caddr_t)&gh->batch);\ + xdr_free(xdr_idmap_mapping_batch, (caddr_t)&gh->batch);\ if (gh->retlist) \ free(gh->retlist);\ gh->retlist = NULL;\ |
