plugins: fix possible use of unitialized variable

Found by Coverity Scan

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2024-04-28 14:39:30 +02:00
parent 612f5a9385
commit e269176a79
+2 -1
View File
@@ -82,9 +82,10 @@ static void setup(void *arg)
len = fwrite(buf, sizeof(buf[0]), len, fp);
fclose(hw);
} else {
no_hwrng:
struct timeval tv;
int iter = 128;
no_hwrng:
gettimeofday(&tv, NULL);
srandom(tv.tv_sec % 3600);
while (iter--) {