From 6522c25b8d5260ab69338217f67403fc5bf3cd8a Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Tue, 31 Aug 2004 11:45:16 +0000 Subject: [PATCH] (sparse_add_map): Fixed improper initializations of sparse_map_size. We assume that whatever number it contains describes adequately the current size of sparse_map. The only number we need to reset is sparse_map_avail. --- src/sparse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sparse.c b/src/sparse.c index d4816f8..bb1a180 100644 --- a/src/sparse.c +++ b/src/sparse.c @@ -189,7 +189,7 @@ sparse_scan_file (struct tar_sparse_file *file) return false; clear_block (buffer); - file->stat_info->sparse_map_size = 0; + file->stat_info->sparse_map_avail = 0; file->stat_info->archive_file_size = 0; if (!tar_sparse_scan (file, scan_begin, NULL)) @@ -626,7 +626,7 @@ oldgnu_get_sparse_info (struct tar_sparse_file *file) int ext_p; static enum oldgnu_add_status rc; - file->stat_info->sparse_map_size = 0; + file->stat_info->sparse_map_avail = 0; for (i = 0; i < SPARSES_IN_OLDGNU_HEADER; i++) { rc = oldgnu_add_sparse (file, &h->oldgnu_header.sp[i]); @@ -752,7 +752,7 @@ star_get_sparse_info (struct tar_sparse_file *file) int ext_p; static enum oldgnu_add_status rc; - file->stat_info->sparse_map_size = 0; + file->stat_info->sparse_map_avail = 0; if (h->star_in_header.prefix[0] == '\0' && h->star_in_header.sp[0].offset[10] != '\0') -- 2.45.2