From: Sergey Poznyakoff Date: Sun, 4 Apr 2004 09:43:09 +0000 (+0000) Subject: include X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=096bf74fcf2734a7fe2f189f2adbcdea7f4a0cde;p=chaz%2Ftar include (size_decoder): Assign to both st->archive_file_size and st->stat.st_size. (st->stat.st_size): Assign to st->stat.st_size (sparse_numbytes_decoder): Removed unused variable --- diff --git a/src/xheader.c b/src/xheader.c index a7d7e98..62fbf5d 100644 --- a/src/xheader.c +++ b/src/xheader.c @@ -28,6 +28,8 @@ #define obstack_chunk_free free #include +#include + bool xheader_protected_pattern_p (const char *pattern); bool xheader_protected_keyword_p (const char *keyword); @@ -592,7 +594,6 @@ void xheader_store (char const *keyword, struct tar_stat_info const *st, void *data) { struct xhdr_tab const *t; - char *value; if (extended_header.buffer) return; @@ -899,7 +900,7 @@ size_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) - st->stat.st_size = u; + st->archive_file_size = st->stat.st_size = u; } static void @@ -942,7 +943,7 @@ sparse_size_decoder (struct tar_stat_info *st, char const *arg) { uintmax_t u; if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) - st->archive_file_size = u; + st->stat.st_size = u; } static void @@ -996,7 +997,7 @@ sparse_numbytes_decoder (struct tar_stat_info *st, char const *arg) { if (st->sparse_map_avail == st->sparse_map_size) { - size_t newsize = st->sparse_map_size *= 2; + st->sparse_map_size *= 2; st->sparse_map = xrealloc (st->sparse_map, st->sparse_map_size * sizeof st->sparse_map[0]);