diff options
| author | Vicent Marti <tanoku@gmail.com> | 2010-12-23 00:15:09 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2010-12-23 00:15:09 +0200 |
| commit | 9f54fe482dd369ebbae67b0b33f7efde206ba249 (patch) | |
| tree | 5b239e63f5040ebece759c5143ea44916d17bb63 /src/util.c | |
| parent | 11f6646f032c669170453e8e359ac337fa9abbb7 (diff) | |
| download | libgit2-9f54fe482dd369ebbae67b0b33f7efde206ba249.tar.gz | |
Remove git_errno
It was not being used by any methods (only by malloc and calloc), and
since it needs to be TLS, it cannot be exported on DLLs on Windows.
Burn it with fire. The API always returns error codes!
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/util.c')
| -rw-r--r-- | src/util.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/util.c b/src/util.c index debf526d2..a3b62effa 100644 --- a/src/util.c +++ b/src/util.c @@ -3,30 +3,6 @@ #include <stdarg.h> #include <stdio.h> -void *git__malloc(size_t n) -{ - void *r = malloc(n); - if (!r) - return git_ptr_error(GIT_ENOMEM); - return r; -} - -void *git__calloc(size_t a, size_t b) -{ - void *r = calloc(a, b); - if (!r) - return git_ptr_error(GIT_ENOMEM); - return r; -} - -char *git__strdup(const char *s) -{ - char *r = strdup(s); - if (!r) - return git_ptr_error(GIT_ENOMEM); - return r; -} - int git__fmt(char *buf, size_t buf_sz, const char *fmt, ...) { va_list va; |
