mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-12 19:03:10 +03:00
src/vfs/tar/tar.c: types accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
03fd500c2e
commit
d4f50f0be5
@ -225,7 +225,7 @@ typedef struct
|
|||||||
static struct vfs_class vfs_tarfs_ops;
|
static struct vfs_class vfs_tarfs_ops;
|
||||||
|
|
||||||
/* As we open one archive at a time, it is safe to have this static */
|
/* As we open one archive at a time, it is safe to have this static */
|
||||||
static int current_tar_position = 0;
|
static off_t current_tar_position = 0;
|
||||||
|
|
||||||
static union record rec_buf;
|
static union record rec_buf;
|
||||||
|
|
||||||
@ -370,7 +370,7 @@ tar_get_next_record (struct vfs_s_super *archive, int tard)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tar_skip_n_records (struct vfs_s_super *archive, int tard, int n)
|
tar_skip_n_records (struct vfs_s_super *archive, int tard, size_t n)
|
||||||
{
|
{
|
||||||
(void) archive;
|
(void) archive;
|
||||||
|
|
||||||
@ -566,7 +566,8 @@ tar_read_header (struct vfs_class *me, struct vfs_s_super *archive, int tard, si
|
|||||||
{
|
{
|
||||||
char **longp;
|
char **longp;
|
||||||
char *bp, *data;
|
char *bp, *data;
|
||||||
int size, written;
|
off_t size;
|
||||||
|
size_t written;
|
||||||
|
|
||||||
if (arch->type == TAR_UNKNOWN)
|
if (arch->type == TAR_UNKNOWN)
|
||||||
arch->type = TAR_GNU;
|
arch->type = TAR_GNU;
|
||||||
@ -593,8 +594,8 @@ tar_read_header (struct vfs_class *me, struct vfs_s_super *archive, int tard, si
|
|||||||
return STATUS_BADCHECKSUM;
|
return STATUS_BADCHECKSUM;
|
||||||
}
|
}
|
||||||
written = RECORDSIZE;
|
written = RECORDSIZE;
|
||||||
if (written > size)
|
if ((off_t) written > size)
|
||||||
written = size;
|
written = (size_t) size;
|
||||||
|
|
||||||
memcpy (bp, data, written);
|
memcpy (bp, data, written);
|
||||||
bp += written;
|
bp += written;
|
||||||
@ -615,9 +616,9 @@ tar_read_header (struct vfs_class *me, struct vfs_s_super *archive, int tard, si
|
|||||||
struct stat st;
|
struct stat st;
|
||||||
struct vfs_s_entry *entry;
|
struct vfs_s_entry *entry;
|
||||||
struct vfs_s_inode *inode = NULL, *parent;
|
struct vfs_s_inode *inode = NULL, *parent;
|
||||||
long data_position;
|
off_t data_position;
|
||||||
char *q;
|
char *q;
|
||||||
int len;
|
size_t len;
|
||||||
char *current_file_name, *current_link_name;
|
char *current_file_name, *current_link_name;
|
||||||
|
|
||||||
current_link_name =
|
current_link_name =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user