Commit 3c41c635fbe330da902f8ccde6494cf7709dfea7

Vicent Marti 2011-03-03T21:58:37

Fix compilation in MSVC MSVC cannot substract void pointers. Go figure. Signed-off-by: Vicent Marti <tanoku@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/vector.c b/src/vector.c
index 6313640..d0b0c5c 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -133,7 +133,7 @@ int git_vector_search2(git_vector *v, git_vector_cmp key_lookup, const void *key
 
 static int strict_comparison(const void *a, const void *b)
 {
-	return a - b;
+	return (a == b) ? 0 : -1;
 }
 
 int git_vector_search(git_vector *v, const void *entry)