summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-04-09 15:22:11 -0700
committerVicent Marti <tanoku@gmail.com>2011-04-09 15:22:11 -0700
commitc6e65acae63bd9b251140184679ab4ea0ec5c1a9 (patch)
tree42e304af6ea9be7f4f35e3beca314fccc9fddd27 /src/util.h
parentb918ae40d1dc5116d7631ef822d7b5b39a622c81 (diff)
downloadlibgit2-c6e65acae63bd9b251140184679ab4ea0ec5c1a9.tar.gz
Properly check `strtol` for errors
We are now using a custom `strtol` implementation to make sure we're not missing any overflow errors.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index f477b64fd..3c606493f 100644
--- a/src/util.h
+++ b/src/util.h
@@ -22,6 +22,8 @@ extern int git__fmt(char *, size_t, const char *, ...)
extern int git__prefixcmp(const char *str, const char *prefix);
extern int git__suffixcmp(const char *str, const char *suffix);
+extern int git__strtol32(long *n, const char *buff, const char **end_buf, int base);
+
/*
* The dirname() function shall take a pointer to a character string
* that contains a pathname, and return a pointer to a string that is a