mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-21 19:51:50 +00:00
Squash warning in mg_random
This commit is contained in:
1 parent
912dd518bf
commit
05050eba38
1 file changed
+1
-2
+1
-2
@@ -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) {
|
||||||
|
|||||||
Reference in new issue
Block a user