From ae1b9e7d2c6d447f912b7cfbfbf33067419bc156 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 4 Jan 2011 15:32:39 -0800 Subject: [PATCH] datapath: Make VERIFY_NUL_STRING return a negative error code. This is the common kernel convention. None of the callers currently do anything with the return code except for test whether it is nonzero, so they don't need any changes. Signed-off-by: Ben Pfaff Acked-by: Jesse Gross --- datapath/linux-2.6/compat-2.6/include/net/netlink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datapath/linux-2.6/compat-2.6/include/net/netlink.h b/datapath/linux-2.6/compat-2.6/include/net/netlink.h index c11a17008..a23deee12 100644 --- a/datapath/linux-2.6/compat-2.6/include/net/netlink.h +++ b/datapath/linux-2.6/compat-2.6/include/net/netlink.h @@ -11,7 +11,7 @@ static inline int VERIFY_NUL_STRING(struct nlattr *attr) { return (!attr || (nla_len(attr) && memchr(nla_data(attr), '\0', nla_len(attr))) - ? 0 : EINVAL); + ? 0 : -EINVAL); } #else static inline int VERIFY_NUL_STRING(struct nlattr *attr) -- 2.43.0