Commit 10aa3fa72afab7ee31e116ae06442fe0f7b79df2

Ramsay Jones 2009-06-04T17:14:35

Fix some "signed/unsigned mismatch" (msvc) compiler warnings Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>

diff --git a/src/util.c b/src/util.c
index bc95d2d..09197a3 100644
--- a/src/util.c
+++ b/src/util.c
@@ -63,7 +63,7 @@ int git__suffixcmp(const char *str, const char *suffix)
 int git__dirname(char *dir, size_t n, char *path)
 {
 	char *s;
-	int  len;
+	size_t len;
 
 	assert(dir && n > 1);
 
@@ -89,7 +89,7 @@ int git__dirname(char *dir, size_t n, char *path)
 int git__basename(char *base, size_t n, char *path)
 {
 	char *s;
-	int  len;
+	size_t len;
 
 	assert(base && n > 1);
 
diff --git a/src/win32/dir.c b/src/win32/dir.c
index 00f43bf..a43ff63 100644
--- a/src/win32/dir.c
+++ b/src/win32/dir.c
@@ -2,7 +2,7 @@
 
 static int init_filter(char *filter, size_t n, const char *dir)
 {
-	int len = strlen(dir);
+	size_t len = strlen(dir);
 
 	if (len+3 >= n)
 		return 0;