[FL-2811] Fix PVS-Studio warnings (#2142)
Co-authored-by: あく <alleteam@gmail.com> Co-authored-by: gornekich <n.gorbadey@gmail.com>
This commit is contained in:
@@ -176,7 +176,7 @@ int32_t update_task_worker_backup_restore(void* context) {
|
||||
|
||||
if(boot_mode == FuriHalRtcBootModePreUpdate) {
|
||||
success = update_task_pre_update(update_task);
|
||||
} else if(boot_mode == FuriHalRtcBootModePostUpdate) {
|
||||
} else if(boot_mode == FuriHalRtcBootModePostUpdate) { //-V547
|
||||
success = update_task_post_update(update_task);
|
||||
if(success) {
|
||||
update_operation_disarm();
|
||||
|
@@ -143,7 +143,6 @@ static void update_task_wait_for_restart(UpdateTask* update_task) {
|
||||
}
|
||||
|
||||
static bool update_task_write_stack(UpdateTask* update_task) {
|
||||
bool success = false;
|
||||
UpdateManifest* manifest = update_task->manifest;
|
||||
do {
|
||||
FURI_LOG_W(TAG, "Writing stack");
|
||||
@@ -162,13 +161,11 @@ static bool update_task_write_stack(UpdateTask* update_task) {
|
||||
update_task_set_progress(update_task, UpdateTaskStageRadioInstall, 100);
|
||||
/* ...system will restart here. */
|
||||
update_task_wait_for_restart(update_task);
|
||||
success = true;
|
||||
} while(false);
|
||||
return success;
|
||||
return false; /* will return only in the case of failure */
|
||||
}
|
||||
|
||||
static bool update_task_remove_stack(UpdateTask* update_task) {
|
||||
bool success = false;
|
||||
do {
|
||||
FURI_LOG_W(TAG, "Removing stack");
|
||||
update_task_set_progress(update_task, UpdateTaskStageRadioErase, 30);
|
||||
@@ -178,9 +175,8 @@ static bool update_task_remove_stack(UpdateTask* update_task) {
|
||||
update_task_set_progress(update_task, UpdateTaskStageRadioErase, 100);
|
||||
/* ...system will restart here. */
|
||||
update_task_wait_for_restart(update_task);
|
||||
success = true;
|
||||
} while(false);
|
||||
return success;
|
||||
return false; /* will return only in the case of failure */
|
||||
}
|
||||
|
||||
static bool update_task_manage_radiostack(UpdateTask* update_task) {
|
||||
|
Reference in New Issue
Block a user