summaryrefslogtreecommitdiffstats
path: root/usr.bin/unifdef
diff options
context:
space:
mode:
authorfanf <fanf@FreeBSD.org>2010-01-19 20:35:44 +0000
committerfanf <fanf@FreeBSD.org>2010-01-19 20:35:44 +0000
commiteb17713b6a14191c02489e4803da7361ececbfbb (patch)
treec87ebc4a1a7f6f2490f835f81763dc4324b309e4 /usr.bin/unifdef
parent7848a5349f855e84d678e5dce37385b1e3ca92e8 (diff)
downloadFreeBSD-src-eb17713b6a14191c02489e4803da7361ececbfbb.zip
FreeBSD-src-eb17713b6a14191c02489e4803da7361ececbfbb.tar.gz
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.
Diffstat (limited to 'usr.bin/unifdef')
-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 86cd18a..f50e600 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);
OpenPOWER on IntegriCloud