more small fnmatch() fixes

This commit is contained in:
Jean-Francois Dockes
2013-03-27 16:56:54 +01:00
parent dd0e89e694
commit 3736c00a3b
5 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -540,7 +540,7 @@ vector<string> ConfSimple::getNames(const string &sk, const char *pattern) const
mylist.reserve(ss->second.size());
map<string, string>::const_iterator it;
for (it = ss->second.begin(); it != ss->second.end(); it++) {
if (pattern && FNM_NOMATCH == fnmatch(pattern, it->first.c_str(), 0))
if (pattern && 0 != fnmatch(pattern, it->first.c_str(), 0))
continue;
mylist.push_back(it->first);
}