From b6bd548cdcb7e3299b8589434a17b01ac4430305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sun, 14 Apr 2002 16:44:04 +0000 Subject: [PATCH] Cast a ptrdiff_t to int before using it as a printf field width. --- lib/libpam/libpam/pam_debug_log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libpam/libpam/pam_debug_log.c b/lib/libpam/libpam/pam_debug_log.c index c354984e44c0..c3fe8e3f8467 100644 --- a/lib/libpam/libpam/pam_debug_log.c +++ b/lib/libpam/libpam/pam_debug_log.c @@ -53,8 +53,8 @@ _pam_verbose_error(pam_handle_t *pamh, int flags, if (period == NULL) period = strchr(modname, '\0'); va_start(ap, format); - asprintf(&fmtbuf, "%.*s: %s: %s\n", period - modname, modname, - function, format); + asprintf(&fmtbuf, "%.*s: %s: %s\n", (int)(period - modname), + modname, function, format); pam_verror(pamh, fmtbuf, ap); free(fmtbuf); va_end(ap);