Index: pam_echo.c =================================================================== RCS file: /home/ncvs/src/lib/libpam/modules/pam_echo/pam_echo.c,v retrieving revision 1.3 diff -u -u -r1.3 pam_echo.c --- pam_echo.c 6 Feb 2003 14:19:50 -0000 1.3 +++ pam_echo.c 12 Jul 2003 13:57:29 -0000 @@ -48,7 +48,11 @@ int argc, const char *argv[]) { char msg[PAM_MAX_MSG_SIZE]; - const char *str, *p, *q; + const char *p, *q; + union { + const char *s; + const void *ptr; + } str; int err, i, item; size_t len; @@ -89,12 +93,12 @@ } if (item == -1) continue; - err = pam_get_item(pamh, item, (const void **)&str); + err = pam_get_item(pamh, item, &str.ptr); if (err != PAM_SUCCESS) return (err); - if (str == NULL) - str = "(null)"; - for (q = str; *q != '\0' && len < sizeof(msg) - 1; ++q) + if (str.s == NULL) + str.s = "(null)"; + for (q = str.s; *q != '\0' && len < sizeof(msg) - 1; ++q) msg[len++] = *q; } }