From 70da129bcbbadfee65297642e942565a23e40337 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 28 Dec 2019 15:07:59 -0600 Subject: Change variable type to avoid typecast. --- toys/posix/tar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toys/posix/tar.c') diff --git a/toys/posix/tar.c b/toys/posix/tar.c index 0327c894..b214b44c 100644 --- a/toys/posix/tar.c +++ b/toys/posix/tar.c @@ -164,12 +164,12 @@ static void skippy(long long len) static void alloread(void *buf, int len) { // actually void **, but automatic typecasting doesn't work with void ** :( - void **b = buf; + char **b = buf; free(*b); *b = xmalloc(len+1); xreadall(TT.fd, *b, len); - ((char*)(*b))[len] = 0; + (*b)[len] = 0; } // callback from dirtree to create archive -- cgit v1.2.3