diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-10-18 00:05:30 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-10-18 17:35:10 +0200 |
commit | d2e4d593516e877f1f6fb40031eb495f36606e16 (patch) | |
tree | 88546004cba7605b074ab6b93e85b917dfb69976 /net/rfkill | |
parent | ccca6607c545534e5b74ef04e0f2f6ba11344be4 (diff) | |
download | linux-d2e4d593516e877f1f6fb40031eb495f36606e16.tar.gz linux-d2e4d593516e877f1f6fb40031eb495f36606e16.tar.bz2 linux-d2e4d593516e877f1f6fb40031eb495f36606e16.zip |
netfilter: nf_tables: avoid uninitialized variable warning
The newly added nft_range_eval() function handles the two possible
nft range operations, but as the compiler warning points out,
any unexpected value would lead to the 'mismatch' variable being
used without being initialized:
net/netfilter/nft_range.c: In function 'nft_range_eval':
net/netfilter/nft_range.c:45:5: error: 'mismatch' may be used uninitialized in this function [-Werror=maybe-uninitialized]
This removes the variable in question and instead moves the
condition into the switch itself, which is potentially more
efficient than adding a bogus 'default' clause as in my
first approach, and is nicer than using the 'uninitialized_var'
macro.
Fixes: 0f3cd9b36977 ("netfilter: nf_tables: add range expression")
Link: http://patchwork.ozlabs.org/patch/677114/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/rfkill')
0 files changed, 0 insertions, 0 deletions