]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
mnl: different signedness compilation warning
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 19 Nov 2021 10:15:35 +0000 (11:15 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 19 Nov 2021 10:21:57 +0000 (11:21 +0100)
mnl.c: In function ‘mnl_batch_talk’:
mnl.c:417:17: warning: comparison of integer expressions of different signedness: ‘unsigned in’ and ‘long int’ [-Wsign-compare]
   if (rcvbufsiz < NFT_MNL_ECHO_RCVBUFF_DEFAULT)
                 ^

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/mnl.c

index 4a10647f9f17914ff517f38bff4b6770ad7427b0..23348e1393bce565b6500432037709c597673b31 100644 (file)
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -377,7 +377,7 @@ static int mnl_batch_extack_cb(const struct nlmsghdr *nlh, void *data)
        return MNL_CB_ERROR;
 }
 
-#define NFT_MNL_ECHO_RCVBUFF_DEFAULT   (MNL_SOCKET_BUFFER_SIZE * 1024)
+#define NFT_MNL_ECHO_RCVBUFF_DEFAULT   (MNL_SOCKET_BUFFER_SIZE * 1024U)
 #define NFT_MNL_ACK_MAXSIZE            ((sizeof(struct nlmsghdr) + \
                                          sizeof(struct nfgenmsg) + (1 << 16)) + \
                                          MNL_SOCKET_BUFFER_SIZE)