From: Thorsten Kukuk Date: Sat, 5 Aug 2006 09:23:06 +0000 (+0000) Subject: Relevant BUGIDs: X-Git-Tag: Linux-PAM-0_99_6_0~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=46843b041fe03b87567f9a9a4c78e807182c73f6;p=linux-pam Relevant BUGIDs: Purpose of commit: cleanup Commit summary: --------------- Fix compiler warning: 2006-08-05 Thorsten Kukuk * modules/pam_succeed_if/pam_succeed_if.c (evaluate): Cast svc variable to char pointer for snprintf. --- diff --git a/ChangeLog b/ChangeLog index 477cf3db..4fea8c6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -2006-08-05 Thorsten Kukuk +2006-08-05 Thorsten Kukuk + + * modules/pam_succeed_if/pam_succeed_if.c (evaluate): Cast + svc variable to char pointer for snprintf. * configure.in: Generate xtests/Makefile. * Makefile.am (SUBDIRS): Add xtests. diff --git a/modules/pam_succeed_if/pam_succeed_if.c b/modules/pam_succeed_if/pam_succeed_if.c index 9115a961..51510de8 100644 --- a/modules/pam_succeed_if/pam_succeed_if.c +++ b/modules/pam_succeed_if/pam_succeed_if.c @@ -275,7 +275,7 @@ evaluate(pam_handle_t *pamh, int debug, const void *svc; if (pam_get_item(pamh, PAM_SERVICE, &svc) != PAM_SUCCESS) svc = ""; - snprintf(buf, sizeof(buf), "%s", svc); + snprintf(buf, sizeof(buf), "%s", (const char *)svc); left = buf; } /* If we have no idea what's going on, return an error. */