Commit c90ea3de78c3f687277fd97d7c298cc49d16b47e

Vicent Marti 2014-01-27T09:34:52

Merge pull request #2078 from linquize/msvc MSVC doesn't like modern code neither

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/examples/general.c b/examples/general.c
index 58e141b..ae87563 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 : "???");