Re: [PATCH] netlink: drop (int) cast on length arg in NLMSG_OK

2015-03-05 Thread David Miller
From: Mike Frysinger Date: Thu, 5 Mar 2015 00:47:08 -0500 > The NLMSG_OK macro compares three things: > - the len arg from the user > - a size_t: sizeof(struct nlmsghdr) > - an int: sizeof(struct nlmsghdr) casted > - an u32: the nlmsghdr->nlmsg_len member > > When building with

Re: [PATCH] netlink: drop (int) cast on length arg in NLMSG_OK

2015-03-05 Thread David Miller
From: Mike Frysinger vap...@gentoo.org Date: Thu, 5 Mar 2015 00:47:08 -0500 The NLMSG_OK macro compares three things: - the len arg from the user - a size_t: sizeof(struct nlmsghdr) - an int: sizeof(struct nlmsghdr) casted - an u32: the nlmsghdr-nlmsg_len member When building with

[PATCH] netlink: drop (int) cast on length arg in NLMSG_OK

2015-03-04 Thread Mike Frysinger
The NLMSG_OK macro compares three things: - the len arg from the user - a size_t: sizeof(struct nlmsghdr) - an int: sizeof(struct nlmsghdr) casted - an u32: the nlmsghdr->nlmsg_len member When building with -Wsign-compare, this macro triggers a signed compare warning. This is because it

[PATCH] netlink: drop (int) cast on length arg in NLMSG_OK

2015-03-04 Thread Mike Frysinger
The NLMSG_OK macro compares three things: - the len arg from the user - a size_t: sizeof(struct nlmsghdr) - an int: sizeof(struct nlmsghdr) casted - an u32: the nlmsghdr-nlmsg_len member When building with -Wsign-compare, this macro triggers a signed compare warning. This is because it