aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-12-17 22:05:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-12-17 22:05:28 +0000
commit97fbdc11ea24f4b455859fe6e9c4f7861d5547f3 (patch)
tree708cd4715b97cb1ef8827480561c69ea9ddf62b1 /usr.sbin/lpr
parent7ae1a278256819a71e566d22398f722d06a22149 (diff)
downloadsrc-97fbdc11ea24f4b455859fe6e9c4f7861d5547f3.tar.gz
src-97fbdc11ea24f4b455859fe6e9c4f7861d5547f3.zip
In usr.sbin/lpr/lpd/printjob.c, use the correct printf length modifiers
for off_t (aka int64_t). MFC after: 1 week
Notes
Notes: svn path=/head/; revision=228664
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 2bc211cdc5f3..ca5fc11d6960 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++) {