aboutgitcodebugslistschat
path: root/udp.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-01-25 20:21:18 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-01-26 16:30:59 +0100
commitcaa22aa644cb56e6fda77ff80c62d038653f3cf9 (patch)
tree07616ecc3704c24d235591e1efce6fb1031f49b2 /udp.c
parent4c7304db85bd4e8ae641ab946a5b3832f24b6eca (diff)
downloadpasst-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar.gz
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar.bz2
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar.lz
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar.xz
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar.zst
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.zip
tcp, udp, util: Fixes for bitmap handling on big-endian, casts
Bitmap manipulating functions would otherwise refer to inconsistent sets of bits on big-endian architectures. While at it, fix up a couple of casts. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'udp.c')
-rw-r--r--udp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/udp.c b/udp.c
index 15e0c96..e1a9ecb 100644
--- a/udp.c
+++ b/udp.c
@@ -684,7 +684,7 @@ void udp_sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
cur_mh->msg_iov = &udp6_l2_iov_tap[0];
msg_i = msglen = iov_in_msg = 0;
- for (i = 0; i < n; i++) {
+ for (i = 0; i < (unsigned)n; i++) {
struct udp6_l2_buf_t *b = &udp6_l2_buf[i];
size_t ip_len, iov_len;
@@ -770,7 +770,7 @@ void udp_sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
cur_mh->msg_iov = &udp4_l2_iov_tap[0];
msg_i = msglen = iov_in_msg = 0;
- for (i = 0; i < n; i++) {
+ for (i = 0; i < (unsigned)n; i++) {
struct udp4_l2_buf_t *b = &udp4_l2_buf[i];
size_t ip_len, iov_len;
in_addr_t s_addr;