Use internal strtol

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
This commit is contained in:
Carlos Martín Nieto 2011-04-11 17:51:05 +02:00
parent 631752aaf6
commit 52ca4f8a39

View File

@ -386,12 +386,9 @@ int git_config_get_long(git_config *cfg, const char *name, long int *out)
if (ret < GIT_SUCCESS)
return ret;
errno = 0;
num = strtol(value, &num_end, 0);
/* There was some error */
if (num_end == value || errno != 0)
return GIT_EINVALIDTYPE;
ret = git__strtol32(&num, value, &num_end, 0);
if (ret < GIT_SUCCESS)
return ret;
switch (*num_end) {
case '\0':