Skip to content

Commit

Permalink
boot_serial: Adapt to API changes in zcbor 0.8.0
Browse files Browse the repository at this point in the history
New arguments in zcbor_new_state are set to NULL/0 because they are
only needed when using the zcbor_unordered_map API.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
  • Loading branch information
oyvindronningstad authored and nordicjm committed Jan 25, 2024
1 parent a899390 commit 63ddb71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions boot/boot_serial/src/boot_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ bs_set(char *buf, int len)
#endif

zcbor_state_t zsd[4];
zcbor_new_state(zsd, sizeof(zsd) / sizeof(zcbor_state_t), (uint8_t *)buf, len, 1);
zcbor_new_state(zsd, sizeof(zsd) / sizeof(zcbor_state_t), (uint8_t *)buf, len, 1, NULL, 0);

struct zcbor_map_decode_key_val image_set_state_decode[] = {
ZCBOR_MAP_DECODE_KEY_DECODER("confirm", zcbor_bool_decode, &confirm),
Expand Down Expand Up @@ -657,7 +657,7 @@ bs_upload(char *buf, int len)
#endif

zcbor_state_t zsd[4];
zcbor_new_state(zsd, sizeof(zsd) / sizeof(zcbor_state_t), (uint8_t *)buf, len, 1);
zcbor_new_state(zsd, sizeof(zsd) / sizeof(zcbor_state_t), (uint8_t *)buf, len, 1, NULL, 0);

struct zcbor_map_decode_key_val image_upload_decode[] = {
ZCBOR_MAP_DECODE_KEY_DECODER("image", zcbor_uint32_decode, &img_num_tmp),
Expand Down Expand Up @@ -910,7 +910,7 @@ bs_echo(char *buf, int len)
uint32_t rc = MGMT_ERR_EINVAL;

zcbor_state_t zsd[4];
zcbor_new_state(zsd, sizeof(zsd) / sizeof(zcbor_state_t), (uint8_t *)buf, len, 1);
zcbor_new_state(zsd, sizeof(zsd) / sizeof(zcbor_state_t), (uint8_t *)buf, len, 1, NULL, 0);

if (!zcbor_map_start_decode(zsd)) {
goto out;
Expand Down

0 comments on commit 63ddb71

Please sign in to comment.