Skip to content

Address Coverity warnings in keymgr.c

Matthijs Mekking requested to merge 1737-coverity-dst_key_gettime into master

Coverity showed that the return value of dst_key_gettime was unchecked in INITIALIZE_STATE. If DST_TIME_CREATED was not set we would set the state to be initialized to a weird last changed time.

This would normally not happen because DST_TIME_CREATED is always set. However, we would rather set the time to now (as the comment also indicates) not match the creation time.

The comment on INITIALIZE_STATE also needs updating as we no longer always initialize to HIDDEN.

Closes #1737 (closed)

Edited by Matthijs Mekking

Merge request reports