Skip to content

Commit c9c268f

Browse files
committed
plugins: fix variable overloading warning in urandom plugin
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 3feff37 commit c9c268f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

plugins/urandom.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,14 @@ static void setup(void *arg)
104104
hw = fopen(hwrng, "r");
105105
if (hw) {
106106
char buf[512];
107-
size_t len;
107+
size_t num;
108108

109-
len = fread(buf, sizeof(buf[0]), sizeof(buf), hw);
110-
if (len == 0)
109+
num = fread(buf, sizeof(buf[0]), sizeof(buf), hw);
110+
if (num == 0)
111111
fallback(fp);
112112
else
113-
len = fwrite(buf, sizeof(buf[0]), len, fp);
113+
fwrite(buf, sizeof(buf[0]), num, fp);
114+
114115
fclose(hw);
115116
} else {
116117
fallback(fp);

0 commit comments

Comments
 (0)