X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/e8d08775f6f9dc8496ee6eea3cf91f06c5991c98..e7fe3729df80f190f6bcaa78d815df75104dc85e:/package/libnl-tiny/src/include/netlink/attr.h diff --git a/package/libnl-tiny/src/include/netlink/attr.h b/package/libnl-tiny/src/include/netlink/attr.h index 7076d67e2..3b56a82dc 100644 --- a/package/libnl-tiny/src/include/netlink/attr.h +++ b/package/libnl-tiny/src/include/netlink/attr.h @@ -508,7 +508,7 @@ static inline int nla_nest_end(struct nl_msg *msg, struct nlattr *start) static inline int nla_parse_nested(struct nlattr *tb[], int maxtype, struct nlattr *nla, struct nla_policy *policy) { - return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy); + return nla_parse(tb, maxtype, (struct nlattr *)nla_data(nla), nla_len(nla), policy); } /** @@ -563,8 +563,8 @@ static inline int nla_strcmp(const struct nlattr *nla, const char *str) */ static inline size_t nla_strlcpy(char *dst, const struct nlattr *nla, size_t dstsize) { - size_t srclen = nla_len(nla); - char *src = nla_data(nla); + size_t srclen = (size_t)nla_len(nla); + char *src = (char*)nla_data(nla); if (srclen > 0 && src[srclen - 1] == '\0') srclen--; @@ -713,7 +713,7 @@ static inline size_t nla_strlcpy(char *dst, const struct nlattr *nla, size_t dst * @arg rem initialized to len, holds bytes currently remaining in stream */ #define nla_for_each_nested(pos, nla, rem) \ - for (pos = nla_data(nla), rem = nla_len(nla); \ + for (pos = (struct nlattr *)nla_data(nla), rem = nla_len(nla); \ nla_ok(pos, rem); \ pos = nla_next(pos, &(rem)))