From 8e23f2a6414d9cb394964afc00c4d6960a106248 Mon Sep 17 00:00:00 2001 From: Tony Finch Date: Tue, 19 Jan 2010 20:35:44 +0000 Subject: [PATCH] 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. --- usr.bin/unifdef/unifdef.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/unifdef/unifdef.c b/usr.bin/unifdef/unifdef.c index 86cd18ae3532..f50e60011b05 100644 --- a/usr.bin/unifdef/unifdef.c +++ b/usr.bin/unifdef/unifdef.c @@ -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);