1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-22 15:47:37 +00:00

Cast a ptrdiff_t to int before using it as a printf field width.

This commit is contained in:
Dag-Erling Smørgrav 2002-04-14 16:44:04 +00:00
parent b3827c8bd6
commit b6bd548cdc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94662

View File

@ -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);