mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-28 10:11:54 +00:00
Use internal strtol
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
This commit is contained in:
parent
631752aaf6
commit
52ca4f8a39
@ -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':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user