We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3feff37 commit c9c268fCopy full SHA for c9c268f
1 file changed
plugins/urandom.c
@@ -104,13 +104,14 @@ static void setup(void *arg)
104
hw = fopen(hwrng, "r");
105
if (hw) {
106
char buf[512];
107
- size_t len;
+ size_t num;
108
109
- len = fread(buf, sizeof(buf[0]), sizeof(buf), hw);
110
- if (len == 0)
+ num = fread(buf, sizeof(buf[0]), sizeof(buf), hw);
+ if (num == 0)
111
fallback(fp);
112
else
113
- len = fwrite(buf, sizeof(buf[0]), len, fp);
+ fwrite(buf, sizeof(buf[0]), num, fp);
114
+
115
fclose(hw);
116
} else {
117
0 commit comments