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:
parent
4b92b10f32
commit
00e7e2a61b
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
static inline int nlmsg_get_error(const struct nlmsghdr *nlh)
|
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)
|
if (nlh->nlmsg_len < sizeof(struct nlmsgerr) + NLMSG_HDRLEN)
|
||||||
return EBADMSG;
|
return EBADMSG;
|
||||||
return err->error & 0x7fffffff;
|
return err->error & 0x7fffffff;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user