Commit 3cd8b687d5dc8006a5eae9e9c4dac212e8df67d1

Vicent Marti 2010-07-10T12:08:04

Fix warning in util.h (signed vs unsigned comparison) This fix had been delayed by Ramsay because on 32-bit systems it highlights the fact that off_t is set to an invalid value. 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/util.h b/src/util.h
index 4195117..71d0a2d 100644
--- a/src/util.h
+++ b/src/util.h
@@ -38,7 +38,7 @@ extern int git__basename(char *base, size_t n, char *path);
 GIT_INLINE(int) git__is_sizet(off_t p)
 {
 	size_t r = (size_t)p;
-	return p == r;
+	return p == (off_t)r;
 }
 
 /*