tpm2-software / tpm2-totp

Attest the trustworthiness of a device against a human using time-based one-time passwords
https://tpm2-software.github.io
BSD 3-Clause "New" or "Revised" License
163 stars 36 forks source link

src: replace localtime by localtime_r #55

Closed diabonas closed 5 years ago

diabonas commented 5 years ago

Fix the alerts reported by LGTM: using the reentrant version of standard library functions is generally safer (though not strictly necessary since we are not using multithreading at the moment).

codecov[bot] commented 5 years ago

Codecov Report

Merging #55 into master will increase coverage by 0.02%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #55      +/-   ##
=========================================
+ Coverage   83.48%   83.5%   +0.02%     
=========================================
  Files           4       4              
  Lines         757     758       +1     
=========================================
+ Hits          632     633       +1     
  Misses        125     125
Impacted Files Coverage Δ
src/tpm2-totp.c 82.38% <100%> (ø) :arrow_up:
src/plymouth-tpm2-totp.c 80.26% <100%> (+0.26%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 37893b4...76c7591. Read the comment docs.