lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Sep 2009 12:13:45 +0400
From:	"Andrey Panin" <pazke@...trinvest.ru>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Tom Zanussi <tzanussi@...il.com>,
	Li Zefan <lizf@...fujitsu.com>
Subject: Re: [PATCH 4/5 v2] tracing/filters: Provide basic regex support

On 267, 09 24, 2009 at 09:49:34PM +0200, Frederic Weisbecker wrote:
> This patch provides basic support for regular expressions in filters.

> +/* Basic regex callbacks */
> +static int regex_match_full(char *str, struct regex *r, int len)
> +{
> +	if (strncmp(str, r->pattern, len) == 0)
> +		return 1;
> +	return 0;
> +}
> +
> +static int regex_match_front(char *str, struct regex *r, int len)
> +{
> +	if (strncmp(str, r->pattern, len) == 0)
> +		return 1;
> +	return 0;
> +}

These two functions are identical, what's the reason to keep them separate ?
And why not simply return strncmp(str, r->pattern, len) == 0 ?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ