summaryrefslogtreecommitdiff
path: root/tests-clar/clar_libgit2.h
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-02 19:56:38 -0700
committerVicent Martí <tanoku@gmail.com>2012-05-02 19:56:38 -0700
commit3fbcac89c47cb66ea193f66da6d93d1c36ed0f5e (patch)
tree1774677db7e5f0e33c3ab3967d64e2c95a631a5e /tests-clar/clar_libgit2.h
parentb02bcd97f80beabc96cd1f861bfc3b5f7532ef8b (diff)
downloadlibgit2-3fbcac89c47cb66ea193f66da6d93d1c36ed0f5e.tar.gz
Remove old and unused error codes
Diffstat (limited to 'tests-clar/clar_libgit2.h')
-rw-r--r--tests-clar/clar_libgit2.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests-clar/clar_libgit2.h b/tests-clar/clar_libgit2.h
index 4d338efca..63bc703d7 100644
--- a/tests-clar/clar_libgit2.h
+++ b/tests-clar/clar_libgit2.h
@@ -13,9 +13,9 @@
* return error codes!
*/
#define cl_git_pass(expr) do { \
- git_clearerror(); \
- if ((expr) != GIT_SUCCESS) \
- clar__assert(0, __FILE__, __LINE__, "Function call failed: " #expr, git_lasterror(), 1); \
+ giterr_clear(); \
+ if ((expr) != 0) \
+ clar__assert(0, __FILE__, __LINE__, "Function call failed: " #expr, giterr_last()->message, 1); \
} while(0)
/**