aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-12-28 15:07:59 -0600
committerRob Landley <rob@landley.net>2019-12-28 15:07:59 -0600
commit70da129bcbbadfee65297642e942565a23e40337 (patch)
treed35df26ebda5b7104609d83356b4791160a44c47
parentbd07fbb1d559d16caae22ae44e78d02b2cc3595e (diff)
downloadtoybox-70da129bcbbadfee65297642e942565a23e40337.tar.gz
Change variable type to avoid typecast.
-rw-r--r--toys/posix/tar.c4
1 files changed, 2 insertions, 2 deletions
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