X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-fetch--tool.c;h=ed4d5de5d5e6d0bef5b29f3d21a3e58ff7778c8b;hb=27c1dbea3e3a23b3c4b3707dfc9a71c3279ae279;hp=2065466f272dba506e6c34f16b12e4726996e0ec;hpb=070739fd351702ea9bb4f65595728ae25a488075;p=git.git diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c index 2065466f2..ed4d5de5d 100644 --- a/builtin-fetch--tool.c +++ b/builtin-fetch--tool.c @@ -6,11 +6,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)); @@ -42,7 +42,7 @@ static int update_ref(const char *action, if (!rla) rla = "(reflog update)"; snprintf(msg, sizeof(msg), "%s: %s", rla, action); - lock = lock_any_ref_for_update(refname, oldval); + lock = lock_any_ref_for_update(refname, oldval, 0); if (!lock) return 1; if (write_ref_sha1(lock, sha1, msg) < 0)