log: fix level picked with globbing on type register
[dpdk.git] / lib / librte_eal / common / eal_common_log.c
index 7647a91..d7a5f9b 100644 (file)
@@ -320,7 +320,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)