Commit ee1c33b146a366260a4648b1f29f470fedaca0fa

Ben Straub 2012-12-03T12:45:15

Don't unconstify when casting

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/common.h b/src/common.h
index 3e7b065..08228c2 100644
--- a/src/common.h
+++ b/src/common.h
@@ -73,7 +73,7 @@ GIT_INLINE(bool) giterr__check_version(const void *structure, unsigned int expec
 	if (!structure)
 		return true;
 
-	unsigned int actual = *(unsigned int*)structure;
+	unsigned int actual = *(const unsigned int*)structure;
 	if (actual > 0 && actual <= expected_max)
 		return true;