From: Tay Ray Chuan Date: Sat, 20 Nov 2010 04:28:51 GMT Subject: Re: [PATCH 5/6] http-push: check path length before using it Message-ID: In-Reply-To: <20101119183339.GB26187@burratino> Hi, On Sat, Nov 20, 2010 at 2:33 AM, Jonathan Nieder wrote: > [snip] > ... or here.  So perhaps: > >                        if (path) { >                                const char *url = repo->path; >                                if (!url) >                                        url = repo->url; >                                if (strncmp(path, url, repo->path_len)) { >                                        error("Parsed path '%s' does not match url: '%s'\n", >                                                path, url); >                                } else { >                                        path += ... Looks much cleaner, thanks. > By the way, is the error behavior correct?  This prints a message with > "error: " and then continues anyway. Yeah, this fits in with the exiting xml code paths - they just indicate errors and continue. -- Cheers, Ray Chuan