Remove an implicit narrowing cast from void* in nl.h.

This cast is fine in C, but if the header is included from C++, even from
an extern "C" block, it will cause an error.
This commit is contained in:
Nicholas J. Kain 2014-03-24 09:55:55 -04:00
parent 4b92b10f32
commit 00e7e2a61b

View File

@ -35,7 +35,7 @@
static inline int nlmsg_get_error(const struct nlmsghdr *nlh)
{
const struct nlmsgerr *err = NLMSG_DATA(nlh);
const struct nlmsgerr *err = (const struct nlmsgerr *)NLMSG_DATA(nlh);
if (nlh->nlmsg_len < sizeof(struct nlmsgerr) + NLMSG_HDRLEN)
return EBADMSG;
return err->error & 0x7fffffff;