aboutgitcodebugslistschat
path: root/tcp_splice.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-11-29 13:17:10 +0100
committerStefano Brivio <sbrivio@redhat.com>2023-12-02 03:54:42 +0100
commit06559048e76343211618ddea02d6739ca578b775 (patch)
tree6a2dc46dc42e7bd916bd86f701aa491aa898c946 /tcp_splice.c
parent4117bd94f967709074ff1f310d7334ab1876ddae (diff)
downloadpasst-06559048e76343211618ddea02d6739ca578b775.tar
passt-06559048e76343211618ddea02d6739ca578b775.tar.gz
passt-06559048e76343211618ddea02d6739ca578b775.tar.bz2
passt-06559048e76343211618ddea02d6739ca578b775.tar.lz
passt-06559048e76343211618ddea02d6739ca578b775.tar.xz
passt-06559048e76343211618ddea02d6739ca578b775.tar.zst
passt-06559048e76343211618ddea02d6739ca578b775.zip
treewide: Use 'z' length modifier for size_t/ssize_t conversions
Types size_t and ssize_t are not necessarily long, it depends on the architecture. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tcp_splice.c')
-rw-r--r--tcp_splice.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tcp_splice.c b/tcp_splice.c
index a5c1332..0a23584 100644
--- a/tcp_splice.c
+++ b/tcp_splice.c
@@ -321,7 +321,7 @@ static int tcp_splice_connect_finish(const struct ctx *c,
if (fcntl(conn->pipe[side][0], F_SETPIPE_SZ,
c->tcp.pipe_size)) {
- trace("TCP (spliced): cannot set %d->%d pipe size to %lu",
+ trace("TCP (spliced): cannot set %d->%d pipe size to %zu",
side, !side, c->tcp.pipe_size);
}
}
@@ -554,7 +554,7 @@ retry:
readlen = splice(conn->s[fromside], NULL,
conn->pipe[fromside][1], NULL, c->tcp.pipe_size,
SPLICE_F_MOVE | SPLICE_F_NONBLOCK);
- trace("TCP (spliced): %li from read-side call", readlen);
+ trace("TCP (spliced): %zi from read-side call", readlen);
if (readlen < 0) {
if (errno == EINTR)
goto retry;
@@ -580,7 +580,7 @@ eintr:
written = splice(conn->pipe[fromside][0], NULL,
conn->s[!fromside], NULL, to_write,
SPLICE_F_MOVE | more | SPLICE_F_NONBLOCK);
- trace("TCP (spliced): %li from write-side call (passed %lu)",
+ trace("TCP (spliced): %zi from write-side call (passed %zi)",
written, to_write);
/* Most common case: skip updating counters. */
@@ -718,7 +718,7 @@ static void tcp_splice_pipe_refill(const struct ctx *c)
if (fcntl(splice_pipe_pool[i][0], F_SETPIPE_SZ,
c->tcp.pipe_size)) {
- trace("TCP (spliced): cannot set pool pipe size to %lu",
+ trace("TCP (spliced): cannot set pool pipe size to %zu",
c->tcp.pipe_size);
}
}