summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2012-12-05 20:50:19 +0100
committerVicent Marti <tanoku@gmail.com>2012-12-05 20:50:19 +0100
commit8ff66112d9c671c44603e2c8f1dd0dc803d9d6f9 (patch)
treea7a07798a8ecf5765a837b6410c73d87045662e7 /src/common.h
parente05ca13f1f3550f59790c0f992841abceee1b4c5 (diff)
downloadlibgit2-8ff66112d9c671c44603e2c8f1dd0dc803d9d6f9.tar.gz
common: Silly MSVC
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h
index 3152669df..3f9dedd91 100644
--- a/src/common.h
+++ b/src/common.h
@@ -70,10 +70,11 @@ int giterr_set_regex(const regex_t *regex, int error_code);
*/
GIT_INLINE(bool) giterr__check_version(const void *structure, unsigned int expected_max, const char *name)
{
+ unsigned int actual = *(const unsigned int*)structure;
+
if (!structure)
return true;
- unsigned int actual = *(const unsigned int*)structure;
if (actual > 0 && actual <= expected_max)
return true;