@@ -62,7 +62,7 @@ enum fota_module_state {
6262 /* The module is waiting for the event FOTA_IMAGE_APPLY to apply the image */
6363 STATE_WAITING_FOR_IMAGE_APPLY ,
6464 /* The FOTA module is waiting for a reboot */
65- STATE_REBOOT_NEEDED ,
65+ STATE_REBOOT_PENDING ,
6666 /* The FOTA module is canceling the job */
6767 STATE_CANCELING ,
6868};
@@ -100,7 +100,7 @@ static void state_downloading_update_run(void *o);
100100static void state_waiting_for_image_apply_entry (void * o );
101101static void state_waiting_for_image_apply_run (void * o );
102102
103- static void state_reboot_needed_entry (void * o );
103+ static void state_reboot_pending_entry (void * o );
104104
105105static void state_canceling_entry (void * o );
106106static void state_canceling_run (void * o );
@@ -136,8 +136,8 @@ static const struct smf_state states[] = {
136136 NULL ,
137137 & states [STATE_RUNNING ],
138138 NULL ),
139- [STATE_REBOOT_NEEDED ] =
140- SMF_CREATE_STATE (state_reboot_needed_entry ,
139+ [STATE_REBOOT_PENDING ] =
140+ SMF_CREATE_STATE (state_reboot_pending_entry ,
141141 NULL ,
142142 NULL ,
143143 & states [STATE_RUNNING ],
@@ -375,7 +375,7 @@ static void state_downloading_update_run(void *o)
375375 & states [STATE_WAITING_FOR_IMAGE_APPLY ]);
376376 break ;
377377 case FOTA_SUCCESS_REBOOT_NEEDED :
378- smf_set_state (SMF_CTX (state_object ), & states [STATE_REBOOT_NEEDED ]);
378+ smf_set_state (SMF_CTX (state_object ), & states [STATE_REBOOT_PENDING ]);
379379 break ;
380380 case FOTA_DOWNLOAD_CANCELED :
381381 __fallthrough ;
@@ -401,7 +401,7 @@ static void state_waiting_for_image_apply_entry(void *o)
401401
402402static void state_waiting_for_image_apply_run (void * o )
403403{
404- struct fota_state * state_object = o ;
404+ const struct fota_state * state_object = ( const struct fota_state * ) o ;
405405
406406 if (& FOTA_CHAN == state_object -> chan ) {
407407 const enum fota_msg_type evt = MSG_TO_FOTA_TYPE (state_object -> msg_buf );
@@ -421,7 +421,7 @@ static void state_waiting_for_image_apply_run(void *o)
421421
422422 break ;
423423 case FOTA_SUCCESS_REBOOT_NEEDED :
424- smf_set_state (SMF_CTX (state_object ), & states [STATE_REBOOT_NEEDED ]);
424+ smf_set_state (SMF_CTX (state_object ), & states [STATE_REBOOT_PENDING ]);
425425 break ;
426426 default :
427427 /* Don't care */
@@ -430,7 +430,7 @@ static void state_waiting_for_image_apply_run(void *o)
430430 }
431431}
432432
433- static void state_reboot_needed_entry (void * o )
433+ static void state_reboot_pending_entry (void * o )
434434{
435435 ARG_UNUSED (o );
436436
0 commit comments