strbuf_readlink: use ssize_t
The return type of readlink() is ssize_t, not int. This probably doesn't matter in practice, as it would require a 2GB symlink destination, but it doesn't hurt to be careful. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Jul 24, 2018 at 06:51 UTC
f3e76ed228d60688b49dbc2735e4633e55969e30
1 file changed
+1
-1
strbuf.c
+1
-1
@@ -469,7 +469,7 @@ int strbuf_readlink(struct strbuf *sb, const char *path, size_t hint)
469
hint = 32;
470
471
while (hint < STRBUF_MAXLINK) {
472
- int len;
472
+ ssize_t len;
473
474
strbuf_grow(sb, hint);
475
len = readlink(path, sb->buf, hint);