projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git]
/
src
/
os_regex
/
os_match.c
diff --git
a/src/os_regex/os_match.c
b/src/os_regex/os_match.c
old mode 100755
(executable)
new mode 100644
(file)
index
a7a7ccf
..
35ca370
--- a/
src/os_regex/os_match.c
+++ b/
src/os_regex/os_match.c
@@
-1,5
+1,3
@@
-/* $OSSEC, os_regex.c, v0.4, 2006/01/02, Daniel B. Cid$ */
-
/* Copyright (C) 2009 Trend Micro Inc.
* All right reserved.
*
/* Copyright (C) 2009 Trend Micro Inc.
* All right reserved.
*
@@
-9,17
+7,14
@@
* Foundation
*/
* Foundation
*/
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include "os_regex.h"
+#include "os_regex.h"
-/** int OS_Match2(char *pattern, char *str) v0.4
- *
- * This function is a wrapper around the compile/execute
+/* This function is a wrapper around the compile/execute
* functions. It should only be used when the pattern is
* only going to be used once.
* Returns 1 on success or 0 on failure.
* functions. It should only be used when the pattern is
* only going to be used once.
* Returns 1 on success or 0 on failure.
@@
-30,17
+25,14
@@
int OS_Match2(const char *pattern, const char *str)
OSMatch reg;
/* If the compilation failed, we don't need to free anything */
OSMatch reg;
/* If the compilation failed, we don't need to free anything */
- if(OSMatch_Compile(pattern, ®, 0))
- {
- if(OSMatch_Execute(str,strlen(str), ®))
- {
+ if (OSMatch_Compile(pattern, ®, 0)) {
+ if (OSMatch_Execute(str, strlen(str), ®)) {
r_code = 1;
}
OSMatch_FreePattern(®);
}
r_code = 1;
}
OSMatch_FreePattern(®);
}
- return(r_code);
+ return (r_code);
}
}
-/* EOF */