aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/cmp/regular.c
diff options
context:
space:
mode:
authorDavid Malone <dwmalone@FreeBSD.org>2001-12-03 20:56:16 +0000
committerDavid Malone <dwmalone@FreeBSD.org>2001-12-03 20:56:16 +0000
commit5748d9ba6f313235f5d4628b0c141e71a51ca5ec (patch)
tree940d4bb02fbc0730ed8e1de011f463d48ae10fcc /usr.bin/cmp/regular.c
parent5d476e73ced081af6c5f1186b5826271112b0d70 (diff)
downloadsrc-5748d9ba6f313235f5d4628b0c141e71a51ca5ec.tar.gz
src-5748d9ba6f313235f5d4628b0c141e71a51ca5ec.zip
Cast off_t to long long before printing. Use %ll instead of %q incase
long long and quad_t are not the same.
Notes
Notes: svn path=/head/; revision=87282
Diffstat (limited to 'usr.bin/cmp/regular.c')
-rw-r--r--usr.bin/cmp/regular.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c
index bf15a73fecb7..f8345cab2519 100644
--- a/usr.bin/cmp/regular.c
+++ b/usr.bin/cmp/regular.c
@@ -107,10 +107,12 @@ c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2)
if ((ch = *p1) != *p2) {
if (xflag) {
dfound = 1;
- (void)printf("%08qx %02x %02x\n", byte - 1, ch, *p2);
+ (void)printf("%08llx %02x %02x\n",
+ (long long)byte - 1, ch, *p2);
} else if (lflag) {
dfound = 1;
- (void)printf("%6qd %3o %3o\n", byte, ch, *p2);
+ (void)printf("%6lld %3o %3o\n",
+ (long long)byte, ch, *p2);
} else
diffmsg(file1, file2, byte, line);
/* NOTREACHED */