Skip to content

Commit

Permalink
update based on pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbland1 committed Aug 15, 2023
1 parent fd03888 commit c26f1e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/update_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,15 +361,15 @@ static int wolfBoot_delta_update(struct wolfBoot_image *boot,
#define MAX_UPDATE_SIZE (size_t)((WOLFBOOT_PARTITION_SIZE - (2 *WOLFBOOT_SECTOR_SIZE)))
#endif

static int RAMFUNCTION wolfBoot_get_total_size(struct wolfBoot_image* boot,
static inline int wolfBoot_get_total_size(struct wolfBoot_image* boot,
struct wolfBoot_image* update)
{
uint32_t total_size = 0;

/* Use biggest size for the swap */
total_size = boot->fw_size + IMAGE_HEADER_SIZE;
if ((update->fw_size + IMAGE_HEADER_SIZE) > total_size)
total_size = update->fw_size + IMAGE_HEADER_SIZE;
total_size = update->fw_size + IMAGE_HEADER_SIZE;

return total_size;
}
Expand Down

0 comments on commit c26f1e6

Please sign in to comment.