Fix portability to 64 bit platforms.

printf("%.*s",i,s) expects an int not a ptrdiff_t

Thanks to bf1783 (at) googlemail.com for the bug report.
This commit is contained in:
Tony Finch 2010-01-19 20:35:44 +00:00
parent 6628ca0a98
commit 8e23f2a641
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202649

View File

@ -334,7 +334,7 @@ main(int argc, char *argv[])
if (dirsep != NULL)
snprintf(tempname, sizeof(tempname),
"%.*s/" TEMPLATE,
dirsep - ofilename, ofilename);
(int)(dirsep - ofilename), ofilename);
else
strlcpy(tempname, TEMPLATE, sizeof(tempname));
ofd = mkstemp(tempname);