diff options
author | Joel Kitching <kitching@google.com> | 2019-06-25 15:54:23 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-06 21:33:35 +0000 |
commit | 9cff6fe1b866abf9c1ad63dd5a9aae415c813296 (patch) | |
tree | 084935aafd9ac28dbcd58fc2d458cfd1d3e62fc7 /futility/updater.c | |
parent | a5ab221a1aebbd159a8f3ff9c68a8e4a8d247421 (diff) | |
download | vboot-9cff6fe1b866abf9c1ad63dd5a9aae415c813296.tar.gz |
vboot: replace Min macro with VB2_MINstabilize-12331.B
Replace old vboot1-style Min macro with VB2_MIN,
and relocate tests accordingly.
BUG=b:124141368
TEST=make clean && make runtests
BRANCH=none
Change-Id: I73d630147eaf23f97dd750769fb1e911dae01848
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1675866
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'futility/updater.c')
-rw-r--r-- | futility/updater.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/futility/updater.c b/futility/updater.c index 82ee4a44..ef142b8b 100644 --- a/futility/updater.c +++ b/futility/updater.c @@ -814,7 +814,7 @@ static int emulate_write_firmware(const char *filename, } if (!errorcnt) { - size_t to_write = Min(to.size, from.size); + size_t to_write = VB2_MIN(to.size, from.size); assert(from.data && to.data); VB2_DEBUG("Writing %zu bytes\n", to_write); @@ -949,7 +949,7 @@ int preserve_firmware_section(const struct firmware_image *image_from, FMAP_NAMELEN, section_name); } /* Use memmove in case if we need to deal with sections that overlap. */ - memmove(to.data, from.data, Min(from.size, to.size)); + memmove(to.data, from.data, VB2_MIN(from.size, to.size)); return 0; } |