diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-08-29 11:07:43 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-08-31 15:13:42 +0200 |
commit | 8812f8fc653e8774098b726635d051477e416569 (patch) | |
tree | a6fece1579600269784f1d8db7b4fedab0b60a9c /src/basic/hashmap.c | |
parent | Merge pull request #24499 from medhefgo/format-signedness (diff) | |
download | systemd-8812f8fc653e8774098b726635d051477e416569.tar.xz systemd-8812f8fc653e8774098b726635d051477e416569.zip |
hashmap: add comment explaining that set_fnmatch() handles fnmatch() errors as non-matches
Diffstat (limited to 'src/basic/hashmap.c')
-rw-r--r-- | src/basic/hashmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c index ddd329c874..8013ac6b8e 100644 --- a/src/basic/hashmap.c +++ b/src/basic/hashmap.c @@ -2079,6 +2079,8 @@ static bool set_fnmatch_one(Set *patterns, const char *needle) { assert(needle); + /* Any failure of fnmatch() is treated as equivalent to FNM_NOMATCH, i.e. as non-matching pattern */ + SET_FOREACH(p, patterns) if (fnmatch(p, needle, 0) == 0) return true; |