Skip to content

Commit

Permalink
hw/rtc/twl92230: Use int64_t for sec_offset and alm_sec
Browse files Browse the repository at this point in the history
In the twl92230 device, use int64_t for the two state fields
sec_offset and alm_sec, because we set these to values that
are either time_t or differences between two time_t values.

These fields aren't saved in vmstate anywhere, so we can
safely widen them.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
  • Loading branch information
pm215 committed Aug 31, 2023
1 parent 7038b6e commit 279695a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/rtc/twl92230.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ struct MenelausState {
struct tm tm;
struct tm new;
struct tm alm;
int sec_offset;
int alm_sec;
int64_t sec_offset;
int64_t alm_sec;
int next_comp;
} rtc;
uint16_t rtc_next_vmstate;
Expand Down

0 comments on commit 279695a

Please sign in to comment.