diff options
| author | Vicent Martà <vicent@github.com> | 2013-03-18 16:17:14 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2013-03-18 16:17:14 -0700 |
| commit | 5b27bf7e5bfd5c2f92a15c0058c801d49faf8403 (patch) | |
| tree | eb4e79c950ec3260ad8a532b4d84dae2ad60ae5d /src/common.h | |
| parent | 50eb8520d06ac0c484a0ce3a3fba6c5da25ec976 (diff) | |
| parent | 324602514fec5ba04fa236c67d633f9b18ad9845 (diff) | |
| download | libgit2-5b27bf7e5bfd5c2f92a15c0058c801d49faf8403.tar.gz | |
Merge pull request #1417 from arrbee/opts-for-paths
Implement opts interface for global/system file search paths
Diffstat (limited to 'src/common.h')
| -rw-r--r-- | src/common.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index e3a9e1984..235da0412 100644 --- a/src/common.h +++ b/src/common.h @@ -56,6 +56,12 @@ #define GITERR_CHECK_ALLOC(ptr) if (ptr == NULL) { return -1; } /** + * Check a return value and propogate result if non-zero. + */ +#define GITERR_CHECK_ERROR(code) \ + do { int _err = (code); if (_err < 0) return _err; } while (0) + +/** * Set the error message for this thread, formatting as needed. */ void giterr_set(int error_class, const char *string, ...); |
