diff options
author | Samuel Huang <huangs@chromium.org> | 2018-05-04 16:11:56 +0000 |
---|---|---|
committer | Edward Lesmes <ehmaldonado@google.com> | 2021-07-23 22:31:33 +0000 |
commit | fd9b41c873bbb0a4bc62297291c43a4355466c90 (patch) | |
tree | e38b3fa8afae4b287a878f67422acc2b9de7f758 /patch_utils.h | |
parent | c9f72e0570b61584a9def111f665bd1207aa43de (diff) | |
download | zucchini-fd9b41c873bbb0a4bc62297291c43a4355466c90.tar.gz |
[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 <huangs@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556076}
NOKEYCHECK=True
GitOrigin-RevId: cfb444ca0a5d494fc7e7beb74b0481249249671a
Diffstat (limited to 'patch_utils.h')
-rw-r--r-- | patch_utils.h | 8 |
1 files changed, 4 insertions, 4 deletions
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) |