mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-08 11:22:52 +00:00
use uint8_t instead of char
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1734 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
acff9df6a8
commit
28a5c9c8b2
@ -32,8 +32,8 @@ typedef struct BDRVCloopState {
|
|||||||
uint64_t* offsets;
|
uint64_t* offsets;
|
||||||
uint32_t sectors_per_block;
|
uint32_t sectors_per_block;
|
||||||
uint32_t current_block;
|
uint32_t current_block;
|
||||||
char* compressed_block;
|
uint8_t *compressed_block;
|
||||||
char* uncompressed_block;
|
uint8_t *uncompressed_block;
|
||||||
z_stream zstream;
|
z_stream zstream;
|
||||||
} BDRVCloopState;
|
} BDRVCloopState;
|
||||||
|
|
||||||
@ -89,9 +89,9 @@ cloop_close:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* initialize zlib engine */
|
/* initialize zlib engine */
|
||||||
if(!(s->compressed_block=(char*)malloc(max_compressed_block_size+1)))
|
if(!(s->compressed_block = malloc(max_compressed_block_size+1)))
|
||||||
goto cloop_close;
|
goto cloop_close;
|
||||||
if(!(s->uncompressed_block=(char*)malloc(s->block_size)))
|
if(!(s->uncompressed_block = malloc(s->block_size)))
|
||||||
goto cloop_close;
|
goto cloop_close;
|
||||||
if(inflateInit(&s->zstream) != Z_OK)
|
if(inflateInit(&s->zstream) != Z_OK)
|
||||||
goto cloop_close;
|
goto cloop_close;
|
||||||
|
@ -44,8 +44,8 @@ typedef struct BDRVDMGState {
|
|||||||
uint64_t* sectors;
|
uint64_t* sectors;
|
||||||
uint64_t* sectorcounts;
|
uint64_t* sectorcounts;
|
||||||
uint32_t current_chunk;
|
uint32_t current_chunk;
|
||||||
char* compressed_chunk;
|
uint8_t *compressed_chunk;
|
||||||
char* uncompressed_chunk;
|
uint8_t *uncompressed_chunk;
|
||||||
z_stream zstream;
|
z_stream zstream;
|
||||||
} BDRVDMGState;
|
} BDRVDMGState;
|
||||||
|
|
||||||
@ -159,9 +159,9 @@ dmg_close:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* initialize zlib engine */
|
/* initialize zlib engine */
|
||||||
if(!(s->compressed_chunk=(char*)malloc(max_compressed_size+1)))
|
if(!(s->compressed_chunk = malloc(max_compressed_size+1)))
|
||||||
goto dmg_close;
|
goto dmg_close;
|
||||||
if(!(s->uncompressed_chunk=(char*)malloc(512*max_sectors_per_chunk)))
|
if(!(s->uncompressed_chunk = malloc(512*max_sectors_per_chunk)))
|
||||||
goto dmg_close;
|
goto dmg_close;
|
||||||
if(inflateInit(&s->zstream) != Z_OK)
|
if(inflateInit(&s->zstream) != Z_OK)
|
||||||
goto dmg_close;
|
goto dmg_close;
|
||||||
|
Loading…
Reference in New Issue
Block a user