[ovs-dev] [netlink v4 26/52] datapath: Make VERIFY_NUL_STRING return a negative error code.
Ben Pfaff
blp at nicira.com
Wed Jan 12 05:49:38 UTC 2011
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 <blp at nicira.com>
---
.../linux-2.6/compat-2.6/include/net/netlink.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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 b9ed532..9472c31 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)
--
1.7.1
More information about the dev
mailing list