From: Ben Pfaff Date: Tue, 4 Jan 2011 23:32:39 +0000 (-0800) Subject: datapath: Make VERIFY_NUL_STRING return a negative error code. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae1b9e7d2c6d447f912b7cfbfbf33067419bc156;p=openvswitch 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 --- 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 c11a1700..a23deee1 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)