use offsetof macro to make scan-build happy
[project/libnl-tiny.git] / genl.c
diff --git a/genl.c b/genl.c
index 055be919e1d35d71b0ce69f1880b2b1cfb5ec89b..f1df3f060c87e52ba785610156a1541f5ac55859 100644 (file)
--- a/genl.c
+++ b/genl.c
@@ -151,7 +151,7 @@ int genlmsg_valid_hdr(struct nlmsghdr *nlh, int hdrlen)
                return 0;
 
        ghdr = nlmsg_data(nlh);
-       if (genlmsg_len(ghdr) < NLMSG_ALIGN(hdrlen))
+       if ((unsigned) genlmsg_len(ghdr) < NLMSG_ALIGN(hdrlen))
                return 0;
 
        return 1;