summaryrefslogtreecommitdiffstats
path: root/usr.bin/cmp
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2001-12-03 20:56:16 +0000
committerdwmalone <dwmalone@FreeBSD.org>2001-12-03 20:56:16 +0000
commit2a38aa8ed1caf3b13d80e0dfd4de6e7106fc99b6 (patch)
tree940d4bb02fbc0730ed8e1de011f463d48ae10fcc /usr.bin/cmp
parentfb311b7cce2693ac7337b1575904b1f71dc02570 (diff)
downloadFreeBSD-src-2a38aa8ed1caf3b13d80e0dfd4de6e7106fc99b6.zip
FreeBSD-src-2a38aa8ed1caf3b13d80e0dfd4de6e7106fc99b6.tar.gz
Cast off_t to long long before printing. Use %ll instead of %q incase
long long and quad_t are not the same.
Diffstat (limited to 'usr.bin/cmp')
-rw-r--r--usr.bin/cmp/misc.c4
-rw-r--r--usr.bin/cmp/regular.c6
-rw-r--r--usr.bin/cmp/special.c3
3 files changed, 8 insertions, 5 deletions
diff --git a/usr.bin/cmp/misc.c b/usr.bin/cmp/misc.c
index 686fc19..1d5db6c 100644
--- a/usr.bin/cmp/misc.c
+++ b/usr.bin/cmp/misc.c
@@ -62,7 +62,7 @@ diffmsg(file1, file2, byte, line)
off_t byte, line;
{
if (!sflag)
- (void)printf("%s %s differ: char %qd, line %qd\n",
- file1, file2, byte, line);
+ (void)printf("%s %s differ: char %lld, line %lld\n",
+ file1, file2, (long long)byte, (long long)line);
exit(DIFF_EXIT);
}
diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c
index bf15a73..f8345ca 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 */
diff --git a/usr.bin/cmp/special.c b/usr.bin/cmp/special.c
index be37f49..5fe0ed1 100644
--- a/usr.bin/cmp/special.c
+++ b/usr.bin/cmp/special.c
@@ -80,7 +80,8 @@ c_special(fd1, file1, skip1, fd2, file2, skip2)
if (ch1 != ch2) {
if (lflag) {
dfound = 1;
- (void)printf("%6qd %3o %3o\n", byte, ch1, ch2);
+ (void)printf("%6lld %3o %3o\n",
+ (long long)byte, ch1, ch2);
} else {
diffmsg(file1, file2, byte, line);
/* NOTREACHED */
OpenPOWER on IntegriCloud