summaryrefslogtreecommitdiff
path: root/pkt-line.c
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2007-05-15 12:49:22 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-05-16 04:16:03 (GMT)
commit8a912bcb250d8bf57b225e1cf02c0d69d54c8920 (patch)
tree51c2ec028d037343a67d99d891e1d01ad736e69e /pkt-line.c
parent2924415f4fb081d9dde687092248c86ec0c40195 (diff)
downloadgit-8a912bcb250d8bf57b225e1cf02c0d69d54c8920.zip
git-8a912bcb250d8bf57b225e1cf02c0d69d54c8920.tar.gz
git-8a912bcb250d8bf57b225e1cf02c0d69d54c8920.tar.bz2
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 'pkt-line.c')
-rw-r--r--pkt-line.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkt-line.c b/pkt-line.c
index b4cb7e2..b605268 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -65,10 +65,10 @@ void packet_write(int fd, const char *fmt, ...)
static void safe_read(int fd, void *buffer, unsigned size)
{
- int n = 0;
+ size_t n = 0;
while (n < size) {
- int ret = xread(fd, (char *) buffer + n, size - n);
+ ssize_t ret = xread(fd, (char *) buffer + n, size - n);
if (ret < 0)
die("read error (%s)", strerror(errno));
if (!ret)