mirror of
https://passt.top/passt
synced 2025-05-28 12:25:34 +02:00
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>
This commit is contained in:
parent
4117bd94f9
commit
06559048e7
6 changed files with 22 additions and 21 deletions
4
pcap.c
4
pcap.c
|
@ -101,7 +101,7 @@ void pcap(const char *pkt, size_t len)
|
|||
|
||||
gettimeofday(&tv, NULL);
|
||||
if (pcap_frame(pkt, len, &tv) != 0)
|
||||
debug("Cannot log packet, length %lu", len);
|
||||
debug("Cannot log packet, length %zu", len);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -123,7 +123,7 @@ void pcap_multiple(const struct iovec *iov, unsigned int n, size_t offset)
|
|||
for (i = 0; i < n; i++) {
|
||||
if (pcap_frame((char *)iov[i].iov_base + offset,
|
||||
iov[i].iov_len - offset, &tv) != 0) {
|
||||
debug("Cannot log packet, length %lu",
|
||||
debug("Cannot log packet, length %zu",
|
||||
iov->iov_len - offset);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue