mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 12:56:46 +00:00
netns_ifaddrs: fix integer comparisons
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
a15c360949
commit
49bdee73fc
@ -31,7 +31,7 @@
|
||||
#define __NETLINK_ALIGN(len) (((len) + 3) & ~3)
|
||||
|
||||
#define __NLMSG_OK(nlh, end) \
|
||||
((char *)(end) - (char *)(nlh) >= sizeof(struct nlmsghdr))
|
||||
((size_t)((char *)(end) - (char *)(nlh)) >= sizeof(struct nlmsghdr))
|
||||
|
||||
#define __NLMSG_NEXT(nlh) \
|
||||
(struct nlmsghdr *)((char *)(nlh) + __NETLINK_ALIGN((nlh)->nlmsg_len))
|
||||
@ -50,7 +50,7 @@
|
||||
(struct rtattr *)((char *)(rta) + __NETLINK_ALIGN((rta)->rta_len))
|
||||
|
||||
#define __RTA_OK(nlh, end) \
|
||||
((char *)(end) - (char *)(rta) >= sizeof(struct rtattr))
|
||||
((size_t)((char *)(end) - (char *)(rta)) >= sizeof(struct rtattr))
|
||||
|
||||
#define __NLMSG_RTAOK(rta, nlh) __RTA_OK(rta, __NLMSG_DATAEND(nlh))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user