aboutsummaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2007-05-15 14:49:22 +0200
committerJunio C Hamano <junkio@cox.net>2007-05-15 21:16:03 -0700
commit8a912bcb250d8bf57b225e1cf02c0d69d54c8920 (patch)
tree51c2ec028d037343a67d99d891e1d01ad736e69e /builtin-apply.c
parent2924415f4fb081d9dde687092248c86ec0c40195 (diff)
downloadgit-8a912bcb250d8bf57b225e1cf02c0d69d54c8920.tar.gz
git-8a912bcb250d8bf57b225e1cf02c0d69d54c8920.tar.xz
Ensure return value from xread() is always stored into an ssize_t
This patch fixes all calls to xread() where the return value is not stored into an ssize_t. The patch should not have any effect whatsoever, other than putting better/more appropriate type names on variables. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 8b8705a6c..0399743c4 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -185,7 +185,7 @@ static void *read_patch_file(int fd, unsigned long *sizep)
void *buffer = xmalloc(alloc);
for (;;) {
- int nr = alloc - size;
+ ssize_t nr = alloc - size;
if (nr < 1024) {
alloc += CHUNKSIZE;
buffer = xrealloc(buffer, alloc);
@@ -1468,7 +1468,7 @@ static int read_old_data(struct stat *st, const char *path, char **buf_p, unsign
return error("unable to open %s", path);
got = 0;
for (;;) {
- int ret = xread(fd, buf + got, size - got);
+ ssize_t ret = xread(fd, buf + got, size - got);
if (ret <= 0)
break;
got += ret;