Re: [PATCH 5/6] http-push: check path length before using it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, Nov 20, 2010 at 2:33 AM, Jonathan Nieder <jrnieder@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]