projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f80831
)
netlink.c: remove always true comparison
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Tue, 13 Aug 2019 09:28:22 +0000
(11:28 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Tue, 13 Aug 2019 09:28:22 +0000
(11:28 +0200)
Earlier in the function we check if fields_num >= 1
src/netlink.c
patch
|
blob
|
history
diff --git
a/src/netlink.c
b/src/netlink.c
index
806265a
..
b998cf3
100644
(file)
--- 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);