chunk_compressor: Use u32 for chunk uncompressed size
authorEric Biggers <ebiggers3@gmail.com>
Sat, 14 Jun 2014 04:36:09 +0000 (23:36 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 14 Jun 2014 04:36:15 +0000 (23:36 -0500)
All chunk sizes must fit in a 32-bit integer because they cannot exceed
'out_chunk_size'.

include/wimlib/chunk_compressor.h
src/compress_parallel.c
src/compress_serial.c

index b902038a393b2556b07a80f1836a5d8dbd3a9a29..96954637a8ef50df3cc0315a51ccbd7414bf1557 100644 (file)
@@ -32,7 +32,7 @@ struct chunk_compressor {
         * %false if the chunk compressor does not have space for the chunk at
         * the present time.  In the latter case, get_chunk() must be called to
         * retrieve a compressed chunk before trying again.  */
-       bool (*submit_chunk)(struct chunk_compressor *, const void *, size_t);
+       bool (*submit_chunk)(struct chunk_compressor *, const void *, u32);
 
        /* Get the next chunk of compressed data.
         *
index f339298abf51715e0cb52f43b4a266a1064b62eb..c33c096580aca7a51c7fb9e40aea3f6981edf5b6 100644 (file)
@@ -332,7 +332,7 @@ submit_compression_msg(struct parallel_chunk_compressor *ctx)
 
 static bool
 parallel_chunk_compressor_submit_chunk(struct chunk_compressor *_ctx,
-                                      const void *chunk, size_t size)
+                                      const void *chunk, u32 size)
 {
        struct parallel_chunk_compressor *ctx = (struct parallel_chunk_compressor *)_ctx;
        struct message *msg;
index 20e069c075358f804a12bed2bf8e21eaf5f615e2..7885a97e286b7795bd6f21ff7b2f35caa4e81aae 100644 (file)
@@ -58,7 +58,7 @@ serial_chunk_compressor_destroy(struct chunk_compressor *_ctx)
 
 static bool
 serial_chunk_compressor_submit_chunk(struct chunk_compressor *_ctx,
-                                    const void *chunk, size_t size)
+                                    const void *chunk, u32 size)
 {
        struct serial_chunk_compressor *ctx = (struct serial_chunk_compressor*)_ctx;