David Turner <dtur...@twosigma.com> writes:

> +static int git_parse_ssize_t(const char *value, ssize_t *ret)
> +{
> +     ssize_t tmp;
> +     if (!git_parse_signed(value, &tmp, 
> maximum_signed_value_of_type(ssize_t)))
> +             return 0;
> +     *ret = tmp;
> +     return 1;
> +}
> +
>  NORETURN
>  static void die_bad_number(const char *name, const char *value)
>  {
> @@ -892,6 +901,14 @@ unsigned long git_config_ulong(const char *name, const 
> char *value)
>       return ret;
>  }
>  
> +ssize_t git_config_ssize_t(const char *name, const char *value)
> +{
> +     ssize_t ret;
> +     if (!git_parse_ssize_t(value, &ret))
> +             die_bad_number(name, value);
> +     return ret;
> +}
> +

Thanks.

Reply via email to