X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fshared%2Fregex_op.c;h=8bb0322d9d67190b5916dfc122fec7a05b94c467;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hp=cf4db77cefb84c22c8a9649b8815bf846ad90c93;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/shared/regex_op.c b/src/shared/regex_op.c index cf4db77..8bb0322 100755 --- a/src/shared/regex_op.c +++ b/src/shared/regex_op.c @@ -1,11 +1,12 @@ -/* @(#) $Id: regex_op.c,v 1.12 2009/06/24 18:53:08 dcid Exp $ */ +/* @(#) $Id: ./src/shared/regex_op.c, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * License (version 2) as published by the FSF - Free Software * Foundation */ @@ -23,11 +24,11 @@ int OS_PRegex(char *str, char *regex) { regex_t preg; - + if(!str || !regex) return(0); - - + + if(regcomp(&preg, regex, REG_EXTENDED|REG_NOSUB) != 0) { merror("%s: Posix Regex compile error (%s).", __local_name, regex); @@ -43,7 +44,7 @@ int OS_PRegex(char *str, char *regex) regfree(&preg); return(1); - + } #endif