summaryrefslogtreecommitdiffstats
path: root/src/vfs/tar/tar-sparse.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:11:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:11:49 +0000
commit1b88cd5ee8510e90e69f885bfd730ce57621781c (patch)
treeb6b33bd695258f68c68824029c279d660ee4b85e /src/vfs/tar/tar-sparse.c
parentAdding upstream version 3:4.8.30. (diff)
downloadmc-1b88cd5ee8510e90e69f885bfd730ce57621781c.tar.xz
mc-1b88cd5ee8510e90e69f885bfd730ce57621781c.zip
Adding upstream version 3:4.8.31.upstream/3%4.8.31upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/vfs/tar/tar-sparse.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vfs/tar/tar-sparse.c b/src/vfs/tar/tar-sparse.c
index 0bc169b..9795d15 100644
--- a/src/vfs/tar/tar-sparse.c
+++ b/src/vfs/tar/tar-sparse.c
@@ -1,7 +1,7 @@
/*
Virtual File System: GNU Tar file system.
- Copyright (C) 2003-2023
+ Copyright (C) 2003-2024
Free Software Foundation, Inc.
Written by:
@@ -547,8 +547,8 @@ oldgnu_get_sparse_info (tar_super_t * archive, struct tar_sparse_file *file)
{
size_t i;
union block *h = current_header;
- int ext_p;
- enum oldgnu_add_status rc;
+ gboolean ext_p;
+ enum oldgnu_add_status rc = add_fail;
if (file->stat_info->sparse_map != NULL)
g_array_set_size (file->stat_info->sparse_map, 0);
@@ -560,8 +560,8 @@ oldgnu_get_sparse_info (tar_super_t * archive, struct tar_sparse_file *file)
break;
}
- for (ext_p = h->oldgnu_header.isextended ? 1 : 0; rc == add_ok && ext_p != 0;
- ext_p = h->sparse_header.isextended ? 1 : 0)
+ for (ext_p = h->oldgnu_header.isextended != 0; rc == add_ok && ext_p;
+ ext_p = h->sparse_header.isextended != 0)
{
h = tar_find_next_block (archive);
if (h == NULL)
@@ -612,7 +612,7 @@ star_get_sparse_info (tar_super_t * archive, struct tar_sparse_file *file)
{
size_t i;
union block *h = current_header;
- int ext_p = 1;
+ gboolean ext_p = TRUE;
enum oldgnu_add_status rc = add_ok;
if (file->stat_info->sparse_map != NULL)
@@ -628,10 +628,10 @@ star_get_sparse_info (tar_super_t * archive, struct tar_sparse_file *file)
break;
}
- ext_p = h->star_in_header.isextended ? 1 : 0;
+ ext_p = h->star_in_header.isextended != 0;
}
- for (; rc == add_ok && ext_p != 0; ext_p = h->star_ext_header.isextended ? 1 : 0)
+ for (; rc == add_ok && ext_p; ext_p = h->star_ext_header.isextended != 0)
{
h = tar_find_next_block (archive);
if (h == NULL)