diff options
author | fanf <fanf@FreeBSD.org> | 2010-01-19 20:35:44 +0000 |
---|---|---|
committer | fanf <fanf@FreeBSD.org> | 2010-01-19 20:35:44 +0000 |
commit | eb17713b6a14191c02489e4803da7361ececbfbb (patch) | |
tree | c87ebc4a1a7f6f2490f835f81763dc4324b309e4 | |
parent | 7848a5349f855e84d678e5dce37385b1e3ca92e8 (diff) | |
download | FreeBSD-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.
-rw-r--r-- | usr.bin/unifdef/unifdef.c | 2 |
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); |