Re: [PATCH] http.c: use 'git_config_string' on configuration options.
- From
Christian Couder <chriscool@tuxfamily.org>
- Date
- Apr 19, 2008, 05:16 UTC
- Message-ID
- <200804190716.55490.chriscool@tuxfamily.org>
- In-Reply-To
- <48089F6A.3040102@tordek.com.ar>
Le vendredi 18 avril 2008, Tordek a écrit :
Show 23 quoted lines
> Signed-off-by: Guillermo O. Freschi <tordek@tordek.com.ar>
> ---
> http.c | 35 ++++++++++-------------------------
> 1 files changed, 10 insertions(+), 25 deletions(-)
>
> diff --git a/http.c b/http.c
> index 256a5f1..cadc1bf 100644
> --- a/http.c
> +++ b/http.c
> @@ -100,39 +100,27 @@ static int http_options(const char *var, const
> char *value)
> }
>
> if (!strcmp("http.sslcert", var)) {
> - if (ssl_cert == NULL) {
> - if (!value)
> - return config_error_nonbool(var);
> - ssl_cert = xstrdup(value);
> - }
> + if (ssl_cert == NULL)
> + return git_config_string(&ssl_cert, var, value);
> return 0;
> }Did you check that there is no compile warnings resulting from this ? Did you read the last sentences of http://git.or.cz/gitwiki/Janitor ?
By the way it seems that your patch has spaces instead of tabs everywhere.
Thanks, Christian.