chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
shared/condition: fix gcc5 warning
[elogind.git]
/
src
/
shared
/
strv.c
diff --git
a/src/shared/strv.c
b/src/shared/strv.c
index e418312d52a6a9cb28a25994971591431f651f42..ee45ad1d0f3bb434044462696f675432e28c3ed4 100644
(file)
--- a/
src/shared/strv.c
+++ b/
src/shared/strv.c
@@
-19,7
+19,6
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <assert.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
@@
-692,3
+691,13
@@
char **strv_reverse(char **l) {
return l;
}
return l;
}
+
+bool strv_fnmatch(char* const* patterns, const char *s, int flags) {
+ char* const* p;
+
+ STRV_FOREACH(p, patterns)
+ if (fnmatch(*p, s, 0) == 0)
+ return true;
+
+ return false;
+}