aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-05-20 09:49:48 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-05-20 09:49:48 +0200
commiteb258131f924fb18711e391afc332a09bffc6fdd (patch)
tree915c0ce0cb6b4454eaecb68da2c326bdf68fe1af
parent699f17852dde0a51f80c12081a33aaa6ba1b4576 (diff)
downloadalpine-conf-eb258131f924fb18711e391afc332a09bffc6fdd.tar.bz2
alpine-conf-eb258131f924fb18711e391afc332a09bffc6fdd.tar.xz
uniso: use ssize_t for skipped bytes
in case we need skip more than 2G.
-rw-r--r--uniso.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uniso.c b/uniso.c
index ec4815d..7f78c7a 100644
--- a/uniso.c
+++ b/uniso.c
@@ -593,7 +593,7 @@ int uniso(int fd)
{
struct uniso_context context, *ctx = &context;
struct uniso_reader *rd;
- int r, skipped;
+ ssize_t r, skipped;
memset(ctx, 0, sizeof(*ctx));
list_init(&ctx->parser_head);
@@ -626,7 +626,7 @@ int uniso(int fd)
r = do_skip(ctx, ISOFS_TMPBUF_SIZE);
if (r > 0) skipped += r;
} while (r == ISOFS_TMPBUF_SIZE);
- if (ctx->loglevel > 1) fprintf(stderr, "Skipped %d bytes at the end\n", skipped);
+ if (ctx->loglevel > 1) fprintf(stderr, "Skipped %zd bytes at the end\n", skipped);
}
free(ctx->tmpbuf);