diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-06-24 21:13:38 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-06-25 07:16:50 (GMT) |
commit | a8b352a4c50b0e44d53c5a74388f942523224171 (patch) | |
tree | eb64b518726993ae3466c34a57bc9d5e0def2bdc /include | |
parent | 8e052f59f431844ff6576dcf7b47293ab4ef45aa (diff) | |
download | libnl-a8b352a4c50b0e44d53c5a74388f942523224171.zip libnl-a8b352a4c50b0e44d53c5a74388f942523224171.tar.gz libnl-a8b352a4c50b0e44d53c5a74388f942523224171.tar.bz2 |
attr: fix compile warning in headers
strlen() returns a size_t type, but nla_put accepts an int only. This
breaks a -Werror build of applications using libnl, so avoid this
warning by explicitly casting the length to an int.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink/attr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/netlink/attr.h b/include/netlink/attr.h index 0ed3da3..82e4c38 100644 --- a/include/netlink/attr.h +++ b/include/netlink/attr.h @@ -205,7 +205,7 @@ extern int nla_is_nested(struct nlattr *); * @arg value NUL terminated character string. */ #define NLA_PUT_STRING(msg, attrtype, value) \ - NLA_PUT(msg, attrtype, strlen(value) + 1, value) + NLA_PUT(msg, attrtype, (int) strlen(value) + 1, value) /** * Add flag attribute to netlink message. |