From fd9b41c873bbb0a4bc62297291c43a4355466c90 Mon Sep 17 00:00:00 2001 From: Samuel Huang Date: Fri, 4 May 2018 16:11:56 +0000 Subject: [Zucchini] Format change: PatchElementHeader: Group fields by "old" and "new". Previously PatchElementHeader members were ordered by: [old_offset, new_offset, old_length, new_length]. This CL changes the order to [old_offset, old_length, new_offset, new_length] to be consistent with PatchHeader's grouping by "old" and "new". Also improve comments in patch_read_write_unittest.cc, and fix input value in PatchElementTest.WrongExtraData. Change-Id: I0dab56b7de1ba99f0a2f686dfebdf422a9d1c3b0 Reviewed-on: https://chromium-review.googlesource.com/1043073 Commit-Queue: Samuel Huang Reviewed-by: Greg Thompson Cr-Commit-Position: refs/heads/master@{#556076} NOKEYCHECK=True GitOrigin-RevId: cfb444ca0a5d494fc7e7beb74b0481249249671a --- patch_utils.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'patch_utils.h') diff --git a/patch_utils.h b/patch_utils.h index b904380..5f49195 100644 --- a/patch_utils.h +++ b/patch_utils.h @@ -34,20 +34,20 @@ struct PatchHeader { }; // Sanity check. -static_assert(sizeof(PatchHeader) == 20, "PatchHeader is 20 bytes"); +static_assert(sizeof(PatchHeader) == 20, "PatchHeader must be 20 bytes"); // Header for a patch element, found at the beginning of every patch element. struct PatchElementHeader { uint32_t old_offset; - uint32_t new_offset; uint32_t old_length; + uint32_t new_offset; uint32_t new_length; - uint32_t exe_type; + uint32_t exe_type; // ExecutableType. }; // Sanity check. static_assert(sizeof(PatchElementHeader) == 20, - "PatchElementHeader is 28 bytes"); + "PatchElementHeader must be 20 bytes"); #pragma pack(pop) -- cgit v1.2.3