BUGFIX: libnl_2

Fixed return value for nla_put.

Change-Id: If1ae33bb38c0e88ca7a9220e90ae35dfb0b44b86
This commit is contained in:
Frank Maker 2011-06-30 17:00:49 -07:00
parent 2e81f58baa
commit 1b53483949
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}