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>
* @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.