Squash warning in mg_random

This commit is contained in:
cpq 2021-03-22 11:29:59 +00:00
parent 912dd518bf
commit 05050eba38

View File

@ -91,9 +91,8 @@ void mg_random(void *buf, size_t len) {
#if MG_ENABLE_FS
FILE *fp = mg_fopen("/dev/urandom", "rb");
if (fp != NULL) {
fread(buf, 1, len, fp);
if (fread(buf, 1, len, fp) == len) done = true;
fclose(fp);
done = true;
}
#endif
if (!done) {