1 /* Copyright (C) 2009 Trend Micro Inc.
4 * This program is a free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General Public
6 * License (version 2) as published by the FSF - Free Software
17 /* This function is a wrapper around the compile/execute
18 * functions. It should only be used when the pattern is
19 * only going to be used once.
20 * Returns 1 on success or 0 on failure.
22 int OS_Match2(const char *pattern, const char *str)
27 /* If the compilation failed, we don't need to free anything */
28 if (OSMatch_Compile(pattern, ®, 0)) {
29 if (OSMatch_Execute(str, strlen(str), ®)) {
33 OSMatch_FreePattern(®);