From f3e76ed228d60688b49dbc2735e4633e55969e30 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 24 Jul 2018 06:51:25 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- strbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'strbuf.c') diff --git a/strbuf.c b/strbuf.c index 6ff1f80129..db9069c937 100644 --- a/strbuf.c +++ b/strbuf.c @@ -469,7 +469,7 @@ int strbuf_readlink(struct strbuf *sb, const char *path, size_t hint) hint = 32; while (hint < STRBUF_MAXLINK) { - int len; + ssize_t len; strbuf_grow(sb, hint); len = readlink(path, sb->buf, hint); -- cgit v1.2.3