aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/unifdef/unifdef.c
diff options
context:
space:
mode:
authorTony Finch <fanf@FreeBSD.org>2010-01-19 20:35:44 +0000
committerTony Finch <fanf@FreeBSD.org>2010-01-19 20:35:44 +0000
commit8e23f2a6414d9cb394964afc00c4d6960a106248 (patch)
treec87ebc4a1a7f6f2490f835f81763dc4324b309e4 /usr.bin/unifdef/unifdef.c
parent6628ca0a98356683a685c0ef9f3795883a1897ba (diff)
downloadsrc-8e23f2a6414d9cb394964afc00c4d6960a106248.tar.gz
src-8e23f2a6414d9cb394964afc00c4d6960a106248.zip
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.
Notes
Notes: svn path=/head/; revision=202649
Diffstat (limited to 'usr.bin/unifdef/unifdef.c')
-rw-r--r--usr.bin/unifdef/unifdef.c2
1 files changed, 1 insertions, 1 deletions
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);