Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Dec 2011 22:05:29 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228664 - head/usr.sbin/lpr/lpd
Message-ID:  <201112172205.pBHM5TLK078619@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat Dec 17 22:05:28 2011
New Revision: 228664
URL: http://svn.freebsd.org/changeset/base/228664

Log:
  In usr.sbin/lpr/lpd/printjob.c, use the correct printf length modifiers
  for off_t (aka int64_t).
  
  MFC after:	1 week

Modified:
  head/usr.sbin/lpr/lpd/printjob.c

Modified: head/usr.sbin/lpr/lpd/printjob.c
==============================================================================
--- head/usr.sbin/lpr/lpd/printjob.c	Sat Dec 17 21:37:21 2011	(r228663)
+++ head/usr.sbin/lpr/lpd/printjob.c	Sat Dec 17 22:05:28 2011	(r228664)
@@ -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++) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112172205.pBHM5TLK078619>