From 0a7fe016a03184815b03fe92d50c58e67c8c05fc Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Thu, 9 Jun 2005 17:29:18 +0000 Subject: Relevant BUGIDs: none Purpose of commit: cleanup Commit summary: --------------- Fix all occurrence of dereferencing type-punned pointer will break strict-aliasing rules warnings --- examples/xsh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/xsh.c') diff --git a/examples/xsh.c b/examples/xsh.c index f8fa1426..7ec5c7a2 100644 --- a/examples/xsh.c +++ b/examples/xsh.c @@ -39,7 +39,7 @@ static struct pam_conv conv = { int main(int argc, char **argv) { pam_handle_t *pamh=NULL; - const char *username=NULL; + const void *username=NULL; const char *service="xsh"; int retcode; @@ -137,10 +137,10 @@ int main(int argc, char **argv) break; } - pam_get_item(pamh, PAM_USER, (const void **) &username); + pam_get_item(pamh, PAM_USER, &username); fprintf(stderr, "The user [%s] has been authenticated and `logged in'\n", - username); + (const char *)username); /* this is always a really bad thing for security! */ system("/bin/sh"); -- cgit v1.2.3