Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jan 2012 23:04:27 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r229226 - stable/9/usr.sbin/lpr/lpd
Message-ID:  <201201012304.q01N4Rrj035456@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sun Jan  1 23:04:27 2012
New Revision: 229226
URL: http://svn.freebsd.org/changeset/base/229226

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

Modified:
  stable/9/usr.sbin/lpr/lpd/printjob.c
Directory Properties:
  stable/9/usr.sbin/lpr/lpd/   (props changed)

Modified: stable/9/usr.sbin/lpr/lpd/printjob.c
==============================================================================
--- stable/9/usr.sbin/lpr/lpd/printjob.c	Sun Jan  1 22:34:37 2012	(r229225)
+++ stable/9/usr.sbin/lpr/lpd/printjob.c	Sun Jan  1 23:04:27 2012	(r229226)
@@ -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?201201012304.q01N4Rrj035456>