Skip to content

Commit 6909c26

Browse files
maass-hamburgcfriedt
authored andcommitted
mgmt: hawkbit: remove hb_context.status_buffer_size
remove hb_context.status_buffer_size and replace it with sizeof(hb_context.status_buffer), because hb_context.status_buffer_size is never set. Signed-off-by: Fin Maaß <[email protected]> (cherry picked from commit 1bea938)
1 parent 6ed0a35 commit 6909c26

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

subsys/mgmt/hawkbit/hawkbit.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ static struct hawkbit_context {
8181
uint8_t *response_data;
8282
int32_t json_action_id;
8383
size_t url_buffer_size;
84-
size_t status_buffer_size;
8584
struct hawkbit_download dl;
8685
struct http_request http_req;
8786
struct flash_img_context flash_ctx;
@@ -903,7 +902,7 @@ static bool send_request(enum http_method method,
903902
ret = json_obj_encode_buf(json_cfg_descr,
904903
ARRAY_SIZE(json_cfg_descr), &cfg,
905904
hb_context.status_buffer,
906-
hb_context.status_buffer_size - 1);
905+
sizeof(hb_context.status_buffer));
907906
if (ret) {
908907
LOG_ERR("Can't encode the JSON script (HAWKBIT_CONFIG_DEVICE): %d", ret);
909908
return false;
@@ -938,7 +937,7 @@ static bool send_request(enum http_method method,
938937
ret = json_obj_encode_buf(json_close_descr,
939938
ARRAY_SIZE(json_close_descr), &close,
940939
hb_context.status_buffer,
941-
hb_context.status_buffer_size - 1);
940+
sizeof(hb_context.status_buffer));
942941
if (ret) {
943942
LOG_ERR("Can't encode the JSON script (HAWKBIT_CLOSE): %d", ret);
944943
return false;
@@ -989,7 +988,7 @@ static bool send_request(enum http_method method,
989988
ret = json_obj_encode_buf(json_dep_fbk_descr,
990989
ARRAY_SIZE(json_dep_fbk_descr),
991990
&feedback, hb_context.status_buffer,
992-
hb_context.status_buffer_size - 1);
991+
sizeof(hb_context.status_buffer));
993992
if (ret) {
994993
LOG_ERR("Can't encode the JSON script (HAWKBIT_REPORT): %d", ret);
995994
return ret;

0 commit comments

Comments
 (0)