Skip to content

Commit

Permalink
fw_update: initialize status before using
Browse files Browse the repository at this point in the history
Initialize status variable during declaration to avoid it being used
uninitialized.

Signed-off-by: Mike Szczys <[email protected]>
  • Loading branch information
szczys committed Jan 8, 2025
1 parent adff600 commit 4a9caac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fw_update.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ enum golioth_status golioth_fw_update_report_state_sync(struct fw_update_compone
_state_callback(state, reason, _state_callback_arg);
}

enum golioth_status status;
enum golioth_status status = GOLIOTH_ERR_FAIL;
uint32_t backoff_s = FW_REPORT_RETRIES_INITAL_DELAY_S;
int retries_remaining = FW_REPORT_MAX_RETRIES;

Expand Down

0 comments on commit 4a9caac

Please sign in to comment.