From 00e7e2a61b0fb9e66340b1f94df0faadbc5c7504 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Mon, 24 Mar 2014 09:55:55 -0400 Subject: [PATCH] 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. --- ndhc/nl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndhc/nl.h b/ndhc/nl.h index 21f47a2..6e54709 100644 --- a/ndhc/nl.h +++ b/ndhc/nl.h @@ -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;