mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-25 23:24:09 +01:00
monitor: Use extra unsigned variable to make NLMSG_OK macro happy
This commit is contained in:
parent
e578b7071d
commit
1db66dbe51
@ -4810,6 +4810,7 @@ static bool nlmon_receive(struct l_io *io, void *user_data)
|
|||||||
unsigned char buf[8192];
|
unsigned char buf[8192];
|
||||||
unsigned char control[32];
|
unsigned char control[32];
|
||||||
ssize_t bytes_read;
|
ssize_t bytes_read;
|
||||||
|
size_t nlmsg_len;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
fd = l_io_get_fd(io);
|
fd = l_io_get_fd(io);
|
||||||
@ -4858,8 +4859,10 @@ static bool nlmon_receive(struct l_io *io, void *user_data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (nlmsg = iov.iov_base; NLMSG_OK(nlmsg, (uint32_t) bytes_read);
|
nlmsg_len = bytes_read;
|
||||||
nlmsg = NLMSG_NEXT(nlmsg, bytes_read)) {
|
|
||||||
|
for (nlmsg = iov.iov_base; NLMSG_OK(nlmsg, nlmsg_len);
|
||||||
|
nlmsg = NLMSG_NEXT(nlmsg, nlmsg_len)) {
|
||||||
switch (proto_type) {
|
switch (proto_type) {
|
||||||
case NETLINK_ROUTE:
|
case NETLINK_ROUTE:
|
||||||
store_netlink(nlmon, tv, proto_type, nlmsg);
|
store_netlink(nlmon, tv, proto_type, nlmsg);
|
||||||
|
Loading…
Reference in New Issue
Block a user