diff options
author | Frank Maker <ffrank@google.com> | 2011-06-30 17:00:49 -0700 |
---|---|---|
committer | Frank Maker <ffrank@google.com> | 2011-06-30 17:39:54 -0700 |
commit | 1b53483949c0ff11ef78bcf67196f0ef4db0aeb4 (patch) | |
tree | a53c1b71b980eb3e93f57546506dec75685f8657 /libnl_2 | |
parent | 2e81f58baa246adbe4dcb479ef40c3f1ffcf8534 (diff) | |
download | core-1b53483949c0ff11ef78bcf67196f0ef4db0aeb4.tar.gz core-1b53483949c0ff11ef78bcf67196f0ef4db0aeb4.tar.bz2 core-1b53483949c0ff11ef78bcf67196f0ef4db0aeb4.zip |
BUGFIX: libnl_2
Fixed return value for nla_put.
Change-Id: If1ae33bb38c0e88ca7a9220e90ae35dfb0b44b86
Diffstat (limited to 'libnl_2')
-rw-r--r-- | libnl_2/attr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libnl_2/attr.c b/libnl_2/attr.c index 11e8ae537..94676681b 100644 --- a/libnl_2/attr.c +++ b/libnl_2/attr.c @@ -154,10 +154,12 @@ int nla_put(struct nl_msg *msg, int attrtype, int datalen, const void *data) /* Reserve space and init nla header */ nla = nla_reserve(msg, attrtype, datalen); - if (nla) + if (nla) { memcpy(nla_data(nla), data, datalen); + return 0; + } - return -errno; + return -EINVAL; } |