mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 13:37:34 +08:00
Squash warning in mg_random
This commit is contained in:
parent
912dd518bf
commit
05050eba38
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user