mirror of
https://github.com/troglobit/finit.git
synced 2026-10-11 17:02:42 +07:00
plugins: fix variable overloading warning in urandom plugin
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+5
-4
@@ -104,13 +104,14 @@ static void setup(void *arg)
|
||||
hw = fopen(hwrng, "r");
|
||||
if (hw) {
|
||||
char buf[512];
|
||||
size_t len;
|
||||
size_t num;
|
||||
|
||||
len = fread(buf, sizeof(buf[0]), sizeof(buf), hw);
|
||||
if (len == 0)
|
||||
num = fread(buf, sizeof(buf[0]), sizeof(buf), hw);
|
||||
if (num == 0)
|
||||
fallback(fp);
|
||||
else
|
||||
len = fwrite(buf, sizeof(buf[0]), len, fp);
|
||||
fwrite(buf, sizeof(buf[0]), num, fp);
|
||||
|
||||
fclose(hw);
|
||||
} else {
|
||||
fallback(fp);
|
||||
|
||||
Reference in New Issue
Block a user