mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-24 04:04:29 +00:00
(libretro-common) Cleanup/style nits for archive_file_{7z/zlib}
This commit is contained in:
parent
e639f12e35
commit
89820220b7
@ -58,17 +58,15 @@ static void* sevenzip_stream_new(void)
|
||||
struct sevenzip_context_t *sevenzip_context =
|
||||
(struct sevenzip_context_t*)calloc(1, sizeof(struct sevenzip_context_t));
|
||||
|
||||
memset(sevenzip_context, 0, sizeof(struct sevenzip_context_t));
|
||||
|
||||
/* These are the allocation routines - currently using
|
||||
* the non-standard 7zip choices. */
|
||||
sevenzip_context->allocImp.Alloc = SzAlloc;
|
||||
sevenzip_context->allocImp.Free = SzFree;
|
||||
sevenzip_context->allocTempImp.Alloc = SzAllocTemp;
|
||||
sevenzip_context->allocTempImp.Free = SzFreeTemp;
|
||||
sevenzip_context->block_index = 0xFFFFFFFF;
|
||||
sevenzip_context->output = NULL;
|
||||
sevenzip_context->handle = NULL;
|
||||
sevenzip_context->block_index = 0xFFFFFFFF;
|
||||
sevenzip_context->output = NULL;
|
||||
sevenzip_context->handle = NULL;
|
||||
|
||||
return sevenzip_context;
|
||||
}
|
||||
@ -83,7 +81,7 @@ static void sevenzip_stream_free(void *data)
|
||||
if (sevenzip_context->output)
|
||||
{
|
||||
IAlloc_Free(&sevenzip_context->allocImp, sevenzip_context->output);
|
||||
sevenzip_context->output = NULL;
|
||||
sevenzip_context->output = NULL;
|
||||
sevenzip_context->handle->data = NULL;
|
||||
}
|
||||
|
||||
@ -262,7 +260,7 @@ static int sevenzip_stream_decompress_data_to_file_iterate(void *data)
|
||||
struct sevenzip_context_t *sevenzip_context =
|
||||
(struct sevenzip_context_t*)data;
|
||||
|
||||
SRes res = SZ_ERROR_FAIL;
|
||||
SRes res = SZ_ERROR_FAIL;
|
||||
size_t output_size = 0;
|
||||
size_t offset = 0;
|
||||
size_t outSizeProcessed = 0;
|
||||
|
@ -57,7 +57,9 @@ static bool zlib_stream_decompress_data_to_file_init(
|
||||
if (!handle)
|
||||
return false;
|
||||
|
||||
if (!(handle->stream = zlib_inflate_backend.stream_new()))
|
||||
handle->stream = zlib_inflate_backend.stream_new();
|
||||
|
||||
if (!handle->stream)
|
||||
goto error;
|
||||
|
||||
if (zlib_inflate_backend.define)
|
||||
@ -123,10 +125,12 @@ static bool zip_file_decompressed_handle(
|
||||
handle, cdata, csize, size))
|
||||
return false;
|
||||
|
||||
do{
|
||||
do
|
||||
{
|
||||
ret = handle->backend->stream_decompress_data_to_file_iterate(
|
||||
handle->stream);
|
||||
}while(ret == 0);
|
||||
|
||||
#if 0
|
||||
handle->real_checksum = handle->backend->stream_crc_calculate(0,
|
||||
handle->data, size);
|
||||
@ -231,11 +235,11 @@ static int zip_file_read(
|
||||
const char *optional_outfile)
|
||||
{
|
||||
file_archive_transfer_t zlib;
|
||||
bool returnerr = true;
|
||||
int ret = 0;
|
||||
struct archive_extract_userdata userdata = {{0}};
|
||||
bool returnerr = true;
|
||||
int ret = 0;
|
||||
|
||||
zlib.type = ARCHIVE_TRANSFER_INIT;
|
||||
zlib.type = ARCHIVE_TRANSFER_INIT;
|
||||
|
||||
userdata.decomp_state.needle = NULL;
|
||||
userdata.decomp_state.opt_file = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user