Cast off_t to long long before printing. Use %ll instead of %q incase
long long and quad_t are not the same.
This commit is contained in:
parent
5d476e73ce
commit
5748d9ba6f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87282
@ -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);
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user