Same fix as the commit 6ff0f81d0ef7 ("log: fix pattern matching"),
fnmatch returns 0 on success.
Fixes: 7f0bb634a140 ("log: add ability to match log type with globbing")
Fixes: 6ff0f81d0ef7 ("log: fix pattern matching")
Cc: [email protected]
Signed-off-by: David Marchand <[email protected]>
---
lib/librte_eal/common/eal_common_log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/eal_common_log.c
b/lib/librte_eal/common/eal_common_log.c
index 4f6f227..d9e5808 100644
--- a/lib/librte_eal/common/eal_common_log.c
+++ b/lib/librte_eal/common/eal_common_log.c
@@ -284,7 +284,7 @@ rte_log_register_type_and_pick_level(const char *name,
uint32_t level_def)
continue;
if (opt_ll->pattern) {
- if (fnmatch(opt_ll->pattern, name, 0))
+ if (fnmatch(opt_ll->pattern, name, 0) == 0)
level = opt_ll->level;
} else {
if (regexec(&opt_ll->re_match, name, 0, NULL, 0) == 0)
--
1.8.3.1