Squash warning in mg_random

This commit is contained in:
cpq committed 2021-03-22 11:29:59 +00:00
1 parent 912dd518bf
commit 05050eba38
1 file changed
+1 -2
+1 -2
View File
@@ -91,9 +91,8 @@ void mg_random(void *buf, size_t len) {
#if MG_ENABLE_FS #if MG_ENABLE_FS
FILE *fp = mg_fopen("/dev/urandom", "rb"); FILE *fp = mg_fopen("/dev/urandom", "rb");
if (fp != NULL) { if (fp != NULL) {
fread(buf, 1, len, fp); if (fread(buf, 1, len, fp) == len) done = true;
fclose(fp); fclose(fp);
done = true;
} }
#endif #endif
if (!done) { if (!done) {