Skip to content

Commit f3e76ed

Browse files
peffgitster
authored andcommitted
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>
1 parent 26114c0 commit f3e76ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

strbuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ int strbuf_readlink(struct strbuf *sb, const char *path, size_t hint)
469469
hint = 32;
470470

471471
while (hint < STRBUF_MAXLINK) {
472-
int len;
472+
ssize_t len;
473473

474474
strbuf_grow(sb, hint);
475475
len = readlink(path, sb->buf, hint);

0 commit comments

Comments
 (0)