Code

gitweb: Lift any characters restriction on searched strings
[git.git] / builtin-fetch--tool.c
index b14e78ac3ffc95c99c2334fab5792f6c49a6c93d..e2f8ede9ae4507ed1e431f9d14fc649f6475627d 100644 (file)
@@ -1,3 +1,4 @@
+#include "builtin.h"
 #include "cache.h"
 #include "refs.h"
 #include "commit.h"
@@ -6,11 +7,11 @@
 
 static char *get_stdin(void)
 {
-       int offset = 0;
+       size_t offset = 0;
        char *data = xmalloc(CHUNK_SIZE);
 
        while (1) {
-               int cnt = xread(0, data + offset, CHUNK_SIZE);
+               ssize_t cnt = xread(0, data + offset, CHUNK_SIZE);
                if (cnt < 0)
                        die("error reading standard input: %s",
                            strerror(errno));