From: Nguyen Thai Ngoc Duy Date: Tue, 04 Sep 2012 12:32:09 GMT Subject: Re: [PATCH 4/9] Refactor excluded_from_list Message-ID: In-Reply-To: <1346544731-938-5-git-send-email-git@adamspiers.org> On Sun, Sep 2, 2012 at 7:12 AM, Adam Spiers wrote: > diff --git a/dir.c b/dir.c > index 57a5d11..3a532d5 100644 > --- a/dir.c > +++ b/dir.c > @@ -509,22 +509,24 @@ static void prep_exclude(struct dir_struct *dir, const char *base, int baselen) > dir->basebuf[baselen] = '\0'; > } > > -/* Scan the list and let the last match determine the fate. > - * Return 1 for exclude, 0 for include and -1 for undecided. > +/* > + * Scan the given exclude list in reverse to see whether pathname > + * should be ignored. The first match (i.e. the last on the list), if > + * any, determines the fate. Returns the exclude_list element which > + * matched, or NULL for undecided. > */ > -int excluded_from_list(const char *pathname, > - int pathlen, const char *basename, int *dtype, > - struct exclude_list *el) > +struct exclude *excluded_from_list_1(const char *pathname, int pathlen, > + const char *basename, int *dtype, > + struct exclude_list *el) > { > int i; > You should keep the new function static. -- Duy