summaryrefslogtreecommitdiff
path: root/pkg/openbsd/patch/0033-rsync-Fix-some-incorrect-format-specifiers.patch
blob: 44763f22c0ab44c5cefcc69ae600926269941733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 0a32d4f555441c1928547f8f08a6373a6c9d8bf1 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Thu, 4 Jun 2020 21:36:24 -0700
Subject: [PATCH] rsync: Fix some incorrect format specifiers

---
 usr.bin/rsync/fargs.c    | 4 ++--
 usr.bin/rsync/uploader.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/usr.bin/rsync/fargs.c b/usr.bin/rsync/fargs.c
index 7ccb5bff7d2..ef1aaf37c87 100644
--- a/usr.bin/rsync/fargs.c
+++ b/usr.bin/rsync/fargs.c
@@ -132,9 +132,9 @@ fargs_cmdline(struct sess *sess, const struct fargs *f, size_t *skip)
 		/* --devices is sent as -D --no-specials */
 		addargs(&args, "--no-specials");
 	if (sess->opts->max_size >= 0)
-		addargs(&args, "--max-size=%lld", sess->opts->max_size);
+		addargs(&args, "--max-size=%jd", (intmax_t)sess->opts->max_size);
 	if (sess->opts->min_size >= 0)
-		addargs(&args, "--min-size=%lld", sess->opts->min_size);
+		addargs(&args, "--min-size=%jd", (intmax_t)sess->opts->min_size);
 
 	/* only add --compare-dest, etc if this is the sender */
 	if (sess->opts->alt_base_mode != 0 &&
diff --git a/usr.bin/rsync/uploader.c b/usr.bin/rsync/uploader.c
index 678b6c96218..951a5ee4133 100644
--- a/usr.bin/rsync/uploader.c
+++ b/usr.bin/rsync/uploader.c
@@ -1010,7 +1010,7 @@ rsync_uploader(struct upload *u, int *fileinfd,
 			init_blk(&blk.blks[i], &blk, offs, i, mbuf, sess);
 			offs += blk.len;
 			LOG3(
-			    "i=%ld, offs=%lld, msz=%ld, blk.len=%lu, blk.rem=%lu",
+			    "i=%zu, offs=%td, msz=%zd, blk.len=%zu, blk.rem=%zu",
 			    i, offs, msz, blk.len, blk.rem);
 			i++;
 		} while (i < blk.blksz);
-- 
2.35.1