datapath: Make VERIFY_NUL_STRING return a negative error code.
authorBen Pfaff <blp@nicira.com>
Tue, 4 Jan 2011 23:32:39 +0000 (15:32 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 27 Jan 2011 17:31:37 +0000 (09:31 -0800)
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@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/linux-2.6/compat-2.6/include/net/netlink.h

index c11a170..a23deee 100644 (file)
@@ -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)