diff options
author | David Vincze <david.vincze@arm.com> | 2019-10-25 15:39:59 +0200 |
---|---|---|
committer | Tamas Ban <tamas.ban@arm.com> | 2019-12-16 13:39:25 +0000 |
commit | 44b79f4aeb7c3048d9f7cb14c861e5a6d0c27476 (patch) | |
tree | 5a7d33c7a34c601a324e692d8f5f0113f98bef09 /bl2 | |
parent | 0dc41d2a7381e2f5469c4cee084e737790037f24 (diff) | |
download | trusted-firmware-m-44b79f4aeb7c3048d9f7cb14c861e5a6d0c27476.tar.gz |
Boot: Remove unnecessary preprocessor directives
Remove unnecessary preprocessor directives to merge the separate, but
logically matching conditionally compiled code blocks into one, without
rearranging the function definitions (which would make the later code
synchronizations harder).
Change-Id: I0867a65ea96431c8883a3e75663238079394a83d
Signed-off-by: David Vincze <david.vincze@arm.com>
Diffstat (limited to 'bl2')
-rw-r--r-- | bl2/ext/mcuboot/bootutil/src/loader.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/bl2/ext/mcuboot/bootutil/src/loader.c b/bl2/ext/mcuboot/bootutil/src/loader.c index 4a08b24d25..a3301cf902 100644 --- a/bl2/ext/mcuboot/bootutil/src/loader.c +++ b/bl2/ext/mcuboot/bootutil/src/loader.c @@ -1202,7 +1202,6 @@ boot_erase_trailer_sectors(const struct boot_loader_state *state, return rc; } -#endif /* !MCUBOOT_OVERWRITE_ONLY */ /** * Swaps the contents of two flash regions within the two image slots. @@ -1215,7 +1214,6 @@ boot_erase_trailer_sectors(const struct boot_loader_state *state, * * @return 0 on success; nonzero on failure. */ -#ifndef MCUBOOT_OVERWRITE_ONLY static void boot_swap_sectors(int idx, uint32_t sz, struct boot_loader_state *state, struct boot_status *bs) @@ -1613,10 +1611,10 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs) } #endif +#ifndef MCUBOOT_OVERWRITE_ONLY /** * Marks the image in the primary slot as fully copied. */ -#ifndef MCUBOOT_OVERWRITE_ONLY static int boot_set_copy_done(uint8_t image_index) { @@ -1633,7 +1631,6 @@ boot_set_copy_done(uint8_t image_index) flash_area_close(fap); return rc; } -#endif /* !MCUBOOT_OVERWRITE_ONLY */ /** * Marks a reverted image in the primary slot as confirmed. This is necessary to @@ -1644,7 +1641,6 @@ boot_set_copy_done(uint8_t image_index) * image installed on the primary slot and the new image to be upgrade to has a * bad sig, image_ok would be overwritten. */ -#ifndef MCUBOOT_OVERWRITE_ONLY static int boot_set_image_ok(uint8_t image_index) { |