Fixed memory leaks in test suite
[libgit2.git] / src / errors.h
blob94093ddb4164980ef98d78b1de318eb0ed74d933
1 #ifndef INCLUDE_errors_h__
2 #define INCLUDE_errors_h__
4 #include "git/errors.h"
6 /* convenience functions */
7 GIT_INLINE(int) git_int_error(int code)
9 git_errno = code;
10 return code;
13 GIT_INLINE(int) git_os_error(void)
15 return git_int_error(GIT_EOSERR);
18 GIT_INLINE(void) *git_ptr_error(int code)
20 git_errno = code;
21 return NULL;
24 #endif