Re: [PATCH] Speedup scanning for excluded files.
- From
Pierre Habouzit <madcoder@debian.org>
- Date
- Oct 29, 2007, 08:02 UTC
- Message-ID
- <20071029080234.GA22826@artemis.corp>
- In-Reply-To
- <200710290845.26727.lars@trolltech.com>
On Mon, Oct 29, 2007 at 07:45:26AM +0000, Lars Knoll wrote:
> +static int no_wildcard(const char *string)
> +{
> + return !strchr(string, '*') && !strchr(string, '?')
> && !strchr(string, '[') && !strchr(string, '{'); return string[strcspn(string, "*?[{")] == '\0';is faster as it doesn't scan the string 4 time in the case where there is no wildcard.
Show 8 quoted lines
> +}
> +
> void add_exclude(const char *string, const char *base,
> int baselen, struct exclude_list *which)
> {
> struct exclude *x = xmalloc(sizeof (*x));
>
> + x->to_exclude = 1;You used spaces in here, and in many places of your patch.
-- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.org