diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-06-09 17:29:18 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-06-09 17:29:18 +0000 |
commit | 0a7fe016a03184815b03fe92d50c58e67c8c05fc (patch) | |
tree | b9c25dd0fbbb71e08b2826e046b763facdcff8df /modules/pam_debug/pam_debug.c | |
parent | fa433b9e2fa1a00e13df36a8b709ffda9e3e715b (diff) | |
download | pam-0a7fe016a03184815b03fe92d50c58e67c8c05fc.tar.gz pam-0a7fe016a03184815b03fe92d50c58e67c8c05fc.tar.bz2 pam-0a7fe016a03184815b03fe92d50c58e67c8c05fc.zip |
Relevant BUGIDs: none
Purpose of commit: cleanup
Commit summary:
---------------
Fix all occurrence of dereferencing type-punned pointer will break
strict-aliasing rules warnings
Diffstat (limited to 'modules/pam_debug/pam_debug.c')
-rw-r--r-- | modules/pam_debug/pam_debug.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/pam_debug/pam_debug.c b/modules/pam_debug/pam_debug.c index a6f3538c..e7ac8861 100644 --- a/modules/pam_debug/pam_debug.c +++ b/modules/pam_debug/pam_debug.c @@ -37,11 +37,14 @@ static int state(pam_handle_t *pamh, const char *text) { int retval; - struct pam_conv *conv; + const void *void_conv; + const struct pam_conv *conv; struct pam_message msg[1], *mesg[1]; struct pam_response *response; - retval = pam_get_item(pamh, PAM_CONV, (const void **)&conv); + retval = pam_get_item(pamh, PAM_CONV, &void_conv); + conv = (const struct pam_conv *) void_conv; + if ((retval != PAM_SUCCESS) || (conv == NULL)) { D(("failed to obtain conversation function")); return PAM_ABORT; @@ -114,7 +117,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, } PAM_EXTERN -int pam_sm_setcred(pam_handle_t *pamh, int flags, int argc, +int pam_sm_setcred(pam_handle_t *pamh, int flags, int argc, const char **argv) { return parse_args(PAM_SUCCESS, "cred", pamh, argc, argv); |