summaryrefslogtreecommitdiff
path: root/genl.c
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-10-04 16:56:12 +0200
committerrofl0r <rofl0r@users.noreply.github.com>2022-09-16 01:27:56 +0000
commit0aeb127f3cfe4abbc9a894c236541467396ed5ff (patch)
tree84cb32664810642e8edc2ddd7f6b3ed60ba452df /genl.c
parent31e166fa8130bef975f85d2c83f69e0619f3289a (diff)
downloadlibnl-tiny-0aeb127f3cfe4abbc9a894c236541467396ed5ff.tar.gz
iron out all extra compiler warnings
gcc 9.1 on x86/64 has reported following: attr.c:403:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare] genl.c:154:24: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare] genl_mngt.c:157:22: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare] msg.c:190:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare] msg.c:192:18: error: comparison of integer expressions of different signedness: ‘__u32’ {aka ‘const unsigned int’} and ‘int’ [-Werror=sign-compare] msg.c:361:10: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare] nl.c:428:18: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare] nl.c:602:23: error: comparison of integer expressions of different signedness: ‘__u32’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare] Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'genl.c')
-rw-r--r--genl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/genl.c b/genl.c
index 055be91..f1df3f0 100644
--- 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;