aboutgitcodebugslistschat
path: root/tap.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 /tap.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 'tap.c')
-rw-r--r--tap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tap.c b/tap.c
index 4f11000..2ceda8d 100644
--- a/tap.c
+++ b/tap.c
@@ -191,7 +191,7 @@ void tap_udp4_send(const struct ctx *c, struct in_addr src, in_port_t sport,
memcpy(data, in, len);
if (tap_send(c, buf, len + (data - buf)) < 0)
- debug("tap: failed to send %lu bytes (IPv4)", len);
+ debug("tap: failed to send %zu bytes (IPv4)", len);
}
/**
@@ -214,7 +214,7 @@ void tap_icmp4_send(const struct ctx *c, struct in_addr src, struct in_addr dst,
csum_icmp4(icmp4h, icmp4h + 1, len - sizeof(*icmp4h));
if (tap_send(c, buf, len + (data - buf)) < 0)
- debug("tap: failed to send %lu bytes (IPv4)", len);
+ debug("tap: failed to send %zu bytes (IPv4)", len);
}
/**
@@ -278,7 +278,7 @@ void tap_udp6_send(const struct ctx *c,
memcpy(data, in, len);
if (tap_send(c, buf, len + (data - buf)) < 1)
- debug("tap: failed to send %lu bytes (IPv6)", len);
+ debug("tap: failed to send %zu bytes (IPv6)", len);
}
/**
@@ -302,7 +302,7 @@ void tap_icmp6_send(const struct ctx *c,
csum_icmp6(icmp6h, src, dst, icmp6h + 1, len - sizeof(*icmp6h));
if (tap_send(c, buf, len + (data - buf)) < 1)
- debug("tap: failed to send %lu bytes (IPv6)", len);
+ debug("tap: failed to send %zu bytes (IPv6)", len);
}
/**
@@ -364,7 +364,7 @@ static void tap_send_remainder(const struct ctx *c, const struct iovec *iov,
ssize_t sent = send(c->fd_tap, base + offset, len - offset,
MSG_NOSIGNAL);
if (sent < 0) {
- err("tap: partial frame send (missing %lu bytes): %s",
+ err("tap: partial frame send (missing %zu bytes): %s",
len - offset, strerror(errno));
return;
}
@@ -433,7 +433,7 @@ size_t tap_send_frames(const struct ctx *c, const struct iovec *iov, size_t n)
m = tap_send_frames_pasta(c, iov, n);
if (m < n)
- debug("tap: failed to send %lu frames of %lu", n - m, n);
+ debug("tap: failed to send %zu frames of %zu", n - m, n);
pcap_multiple(iov, m, c->mode == MODE_PASST ? sizeof(uint32_t) : 0);