hcrypto: Fix warning in HMAC_Init_ex()

This commit is contained in:
Nicolas Williams
2022-12-30 16:38:55 -06:00
parent 20c4c0dea9
commit 274b683d76
5 changed files with 24 additions and 5 deletions

View File

@@ -501,10 +501,9 @@ fortuna_reseed(void)
/* add /etc/shadow */
fd = open("/etc/shadow", O_RDONLY, 0);
if (fd >= 0) {
ssize_t n;
rk_cloexec(fd);
/* add_entropy will hash the buf */
while ((n = read(fd, (char *)u.shad, sizeof(u.shad))) > 0)
while (read(fd, (char *)u.shad, sizeof(u.shad)) > 0)
add_entropy(&main_state, u.shad, sizeof(u.shad));
close(fd);
}