new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / os_regex / os_regex.c
old mode 100755 (executable)
new mode 100644 (file)
index 713b2c6..4902fe5
@@ -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.
  *
@@ -9,7 +7,6 @@
  * Foundation
  */
 
-
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -17,9 +14,7 @@
 #include "os_regex.h"
 
 
-/** int OS_Regex(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.
@@ -30,18 +25,14 @@ int OS_Regex(const char *pattern, const char *str)
     OSRegex reg;
 
     /* If the compilation failed, we don't need to free anything */
-    if(OSRegex_Compile(pattern, &reg, 0))
-    {
-        if(OSRegex_Execute(str, &reg))
-        {
+    if (OSRegex_Compile(pattern, &reg, 0)) {
+        if (OSRegex_Execute(str, &reg)) {
             r_code = 1;
         }
 
         OSRegex_FreePattern(&reg);
     }
 
-    return(r_code);
+    return (r_code);
 }
 
-
-/* EOF */