From: Ruben Kerkhof Date: Tue, 13 Aug 2019 09:28:22 +0000 (+0200) Subject: netlink.c: remove always true comparison X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=bac4ee91197b220e4ee931353d8670e59fb868f5;hp=2f8083194bee1ea05b189c2fd06090659986a54a netlink.c: remove always true comparison Earlier in the function we check if fields_num >= 1 --- diff --git a/src/netlink.c b/src/netlink.c index 806265a2..b998cf31 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -638,7 +638,7 @@ static int ir_config(const char *key, const char *value) { } else if ((strcasecmp(key, "QDisc") == 0) || (strcasecmp(key, "Class") == 0) || (strcasecmp(key, "Filter") == 0)) { - if ((fields_num < 1) || (fields_num > 2)) { + if (fields_num > 2) { ERROR("netlink plugin: Invalid number of fields for option " "`%s'. Got %i, expected 1 or 2.", key, fields_num);