diff options
author | Linquize <linquize@yahoo.com.hk> | 2014-01-27 20:51:46 +0800 |
---|---|---|
committer | Linquize <linquize@yahoo.com.hk> | 2014-01-27 20:52:57 +0800 |
commit | fbc5661ebfd7106d579d22f06150fded2e707070 (patch) | |
tree | dc470c49c13efbd608b30b42f334054cdb618b28 /examples | |
parent | 66d585c6b344562c67812840aca5ea76881f7446 (diff) | |
download | libgit2-fbc5661ebfd7106d579d22f06150fded2e707070.tar.gz |
MSVC doesn't like modern code neither
Diffstat (limited to 'examples')
-rw-r--r-- | examples/general.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/general.c b/examples/general.c index 58e141b35..ae8756338 100644 --- a/examples/general.c +++ b/examples/general.c @@ -47,11 +47,10 @@ // as an example. static void check_error(int error_code, const char *action) { + const git_error *error = giterr_last(); if (!error_code) return; - const git_error *error = giterr_last(); - printf("Error %d %s - %s\n", error_code, action, (error && error->message) ? error->message : "???"); |