[PATCH] transport: simplify duplicating a substring in transport_get() using xmemdupz()

2014-12-23 Thread René Scharfe
Signed-off-by: Rene Scharfe l@web.de --- transport.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/transport.c b/transport.c index 70d38e4..08bcd3a 100644 --- a/transport.c +++ b/transport.c @@ -971,9 +971,7 @@ struct transport *transport_get(struct remote *remote,

Re: [PATCH] transport: simplify duplicating a substring in transport_get() using xmemdupz()

2014-12-23 Thread Jonathan Nieder
René Scharfe wrote: Signed-off-by: Rene Scharfe l@web.de --- transport.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Since external_specification_len(url) is defined to always be less than strlen(url) when is_url(url), this should be safe. Reviewed-by: Jonathan Nieder