]> git.ipfire.org Git - thirdparty/nftables.git/commit
exhtdr: pacify compiler warning
authorFlorian Westphal <fw@strlen.de>
Thu, 13 Jul 2017 14:02:31 +0000 (16:02 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 13 Jul 2017 15:40:13 +0000 (17:40 +0200)
commit92b74b562551a34b210667b692689cf224521209
tree2e936faacc549b491850f92398486e1c7baac9a8
parent4311d0939bd20a11a7a4bfae7462a02c986fdaa0
exhtdr: pacify compiler warning

gcc 7.1.1 complains:

exthdr.c:41:31: warning: ā€˜%d’ directive output may be truncated writing between 1 and 8 bytes into a region of size 3 [-Wformat-truncation=]
    snprintf(buf, sizeof buf, "%d", offset);
                               ^~
This warning is incorrect, as offset is limited by tcp option ranges,
but gcc doesn't know this. Increase buffer to avoid the warning.

Signed-off-by: Florian Westphal <fw@strlen.de>
src/exthdr.c