plugins: netlink: fix gcc signed vs unsigned comparsion warning

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-05-27 11:18:06 +02:00
parent 5f3958fab4
commit 93a027ca23
+3 -2
View File
@@ -231,6 +231,7 @@ static int nl_parse(int sd)
while (1) {
struct nlmsghdr *nh;
ssize_t len;
size_t l;
while ((len = recv(sd, nl_buf, NL_BUFSZ, 0)) < 0) {
switch (errno) {
@@ -252,8 +253,8 @@ static int nl_parse(int sd)
}
_d("recv %lld bytes", len);
for (nh = (struct nlmsghdr *)nl_buf; NLMSG_OK(nh, len); nh = NLMSG_NEXT(nh, len)) {
l = (size_t)len;
for (nh = (struct nlmsghdr *)nl_buf; NLMSG_OK(nh, l); nh = NLMSG_NEXT(nh, l)) {
struct nlmsgerr *nle;
switch (nh->nlmsg_type) {