fast-import: size_t vs ssize_t
authorSami Farin <safari-kernel@safari.iki.fi>
Tue, 24 Apr 2007 19:56:02 +0000 (22:56 +0300)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 24 Apr 2007 20:14:48 +0000 (16:14 -0400)
size_t is unsigned, so (n < 0) is never true.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c
index e3290df3d4647fe97b5c9843299fc6f5b7155889..c4c8cb905e3bcdfb131af40da9f7e29ca86b4a01 100644 (file)
@@ -673,7 +673,7 @@ static void fixup_header_footer(void)
 
        buf = xmalloc(buf_sz);
        for (;;) {
-               size_t n = xread(pack_fd, buf, buf_sz);
+               ssize_t n = xread(pack_fd, buf, buf_sz);
                if (!n)
                        break;
                if (n < 0)