Skip to content
Snippets Groups Projects
Commit 4f2c6587 authored by Xiaojuan Yang's avatar Xiaojuan Yang Committed by Richard Henderson
Browse files

hw/rtc/ls7a_rtc: Fix uninitialied bugs and toymatch writing function


1. Initialize the tm struct in toymatch_write() and ls7a_toy_start() to
   fix uninitialized bugs.
2. Fix toymatch_val_to_time function. By the document, when we calculate
   the expiration year, we should first get current year, and replace the
   0-5 bits with toymatch's 26-31 bits.

Fixes: Coverity CID 1489766, 1489763

Signed-off-by: default avatarXiaojuan Yang <yangxiaojuan@loongson.cn>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Message-Id: <20220701093407.2150607-2-yangxiaojuan@loongson.cn>
Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parent 490c03ab
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment