patch-2.4.27 linux-2.4.27/include/linux/netlink.h
Next file: linux-2.4.27/include/linux/pci.h
Previous file: linux-2.4.27/include/linux/netfilter_ipv6/ip6_tables.h
Back to the patch index
Back to the overall index
- Lines: 10
- Date:
2004-08-07 16:26:06.298414330 -0700
- Orig file:
linux-2.4.26/include/linux/netlink.h
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.26/include/linux/netlink.h linux-2.4.27/include/linux/netlink.h
@@ -67,7 +67,8 @@
#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
(struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
-#define NLMSG_OK(nlh,len) ((len) > 0 && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
+#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \
+ (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
(nlh)->nlmsg_len <= (len))
#define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)