commit da29d1879a28ed9c71c3c558dad418c9fa31f9ab
parent 13547eadfee608bbc89d4608f62960bfef0e9d49
Author: sin <sin@2f30.org>
Date: Sat, 19 Dec 2015 11:30:04 +0000
Remove unneeded casts
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/torrent.c b/torrent.c
@@ -158,8 +158,8 @@ loadtorrent(char *f)
warnx("length is < 0 in %s", f);
goto err3;
}
- totallen += (size_t)length->i;
- t->files[t->nfiles].len = (size_t)length->i;
+ totallen += length->i;
+ t->files[t->nfiles].len = length->i;
if (!(path = dlookstr(file->v, "path")))
break;
@@ -201,7 +201,7 @@ loadtorrent(char *f)
t->files[0].len = length->i;
t->files[0].path = t->filename;
t->filename = strdup("");
- totallen = (size_t)length->i;
+ totallen = length->i;
}
t->npieces = (totallen + t->piecelen - 1) / t->piecelen;