BUGFIX: libnl_2
Fixed return value for nla_put. Change-Id: If1ae33bb38c0e88ca7a9220e90ae35dfb0b44b86
This commit is contained in:
parent
2e81f58baa
commit
1b53483949
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue