summaryrefslogtreecommitdiffstats
path: root/bin/rcp/rcp.c
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-10-06 03:50:06 +0000
committertjr <tjr@FreeBSD.org>2002-10-06 03:50:06 +0000
commit35ddfecc3802d102e700c0c610d495c8a4b0028c (patch)
treebc1a1338076c3818e0c29c3a038436eea901b1e5 /bin/rcp/rcp.c
parent0eb784108f8156b21532f312b82f257745c8288a (diff)
downloadFreeBSD-src-35ddfecc3802d102e700c0c610d495c8a4b0028c.zip
FreeBSD-src-35ddfecc3802d102e700c0c610d495c8a4b0028c.tar.gz
Use %jd in format string and cast argument to intmax_t instead of using
%qd to print struct stat.st_size. Remove WARNS=0 and WFORMAT=0 from Makefile. Tested on: alpha, sparc64, i386
Diffstat (limited to 'bin/rcp/rcp.c')
-rw-r--r--bin/rcp/rcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c
index 468ec7d..b18bbc3 100644
--- a/bin/rcp/rcp.c
+++ b/bin/rcp/rcp.c
@@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$");
#include <paths.h>
#include <pwd.h>
#include <signal.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -489,8 +490,8 @@ syserr: run_err("%s: %s", name, strerror(errno));
goto next;
}
#define MODEMASK (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
- (void)snprintf(buf, sizeof(buf), "C%04o %qd %s\n",
- stb.st_mode & MODEMASK, stb.st_size, last);
+ (void)snprintf(buf, sizeof(buf), "C%04o %jd %s\n",
+ stb.st_mode & MODEMASK, (intmax_t)stb.st_size, last);
(void)write(rem, buf, strlen(buf));
if (response() < 0)
goto next;
OpenPOWER on IntegriCloud