From eeddd7072b3960dbe7004d5a41f4663173d0038f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 27 May 2016 17:29:12 +0200 Subject: [PATCH] Move struct to top --- patch.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/patch.c b/patch.c index 358ef81911..97e1fb55e5 100644 --- a/patch.c +++ b/patch.c @@ -68,6 +68,15 @@ struct bps_data size_t source_relative_offset, target_relative_offset, output_offset; }; +struct ups_data +{ + const uint8_t *patch_data, *source_data; + uint8_t *target_data; + unsigned patch_length, source_length, target_length; + unsigned patch_offset, source_offset, target_offset; + unsigned patch_checksum, source_checksum, target_checksum; +}; + typedef enum patch_error (*patch_func_t)(const uint8_t*, size_t, const uint8_t*, size_t, uint8_t*, size_t*); @@ -206,7 +215,6 @@ static enum patch_error bps_apply_patch( } } - for (i = 0; i < 32; i += 8) modify_source_checksum |= bps_read(&bps) << i; for (i = 0; i < 32; i += 8) @@ -237,15 +245,6 @@ static enum patch_error bps_apply_patch( return PATCH_SUCCESS; } -struct ups_data -{ - const uint8_t *patch_data, *source_data; - uint8_t *target_data; - unsigned patch_length, source_length, target_length; - unsigned patch_offset, source_offset, target_offset; - unsigned patch_checksum, source_checksum, target_checksum; -}; - static uint8_t ups_patch_read(struct ups_data *data) { #ifdef HAVE_ZLIB