summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-12-17 22:05:28 +0000
committerdim <dim@FreeBSD.org>2011-12-17 22:05:28 +0000
commit7dcb1394db98f314138bce48e95ab541a1891e38 (patch)
tree708cd4715b97cb1ef8827480561c69ea9ddf62b1 /usr.sbin/lpr
parent05e60339a1cab76d063d6f88ed145b459357012f (diff)
downloadFreeBSD-src-7dcb1394db98f314138bce48e95ab541a1891e38.zip
FreeBSD-src-7dcb1394db98f314138bce48e95ab541a1891e38.tar.gz
In usr.sbin/lpr/lpd/printjob.c, use the correct printf length modifiers
for off_t (aka int64_t). MFC after: 1 week
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r--usr.sbin/lpr/lpd/printjob.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c
index 2bc211c..ca5fc11 100644
--- a/usr.sbin/lpr/lpd/printjob.c
+++ b/usr.sbin/lpr/lpd/printjob.c
@@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
#include <fcntl.h>
#include <dirent.h>
#include <errno.h>
+#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -1138,9 +1139,10 @@ sendagain:
copycnt++;
if (copycnt < 2)
- (void) sprintf(buf, "%c%qd %s\n", type, stb.st_size, file);
+ (void) sprintf(buf, "%c%" PRId64 " %s\n", type, stb.st_size,
+ file);
else
- (void) sprintf(buf, "%c%qd %s_c%d\n", type, stb.st_size,
+ (void) sprintf(buf, "%c%" PRId64 " %s_c%d\n", type, stb.st_size,
file, copycnt);
amt = strlen(buf);
for (i = 0; ; i++) {
OpenPOWER on IntegriCloud