nhorman / rng-tools

The rng-tools official repository (formerly part of the gkernel project on sourceforge)
GNU General Public License v2.0
156 stars 62 forks source link

Refactor xread_tpm() code #211

Closed nefigtut closed 4 months ago

nefigtut commented 4 months ago

Add ssize_t r2 variable for write() return value. Use retval variable solely as a boolean for the function return code. Subtract TPM_GET_RNG_OVERHEAD from r after the check.

Fixes #210.