mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-18 23:53:15 +08:00
Fix #1447 - typo in mg_random()
This commit is contained in:
parent
6c79a406cd
commit
ad6e395da0
@ -4245,7 +4245,7 @@ void mg_random(void *buf, size_t len) {
|
||||
while (len--) *p++ = (unsigned char) (esp_random() & 255);
|
||||
done = true;
|
||||
#elif MG_ARCH == MG_ARCH_WIN32
|
||||
#elif MG_ARCH_UNIX
|
||||
#elif MG_ARCH == MG_ARCH_UNIX
|
||||
FILE *fp = fopen("/dev/urandom", "rb");
|
||||
if (fp != NULL) {
|
||||
if (fread(buf, 1, len, fp) == len) done = true;
|
||||
|
@ -70,7 +70,7 @@ void mg_random(void *buf, size_t len) {
|
||||
while (len--) *p++ = (unsigned char) (esp_random() & 255);
|
||||
done = true;
|
||||
#elif MG_ARCH == MG_ARCH_WIN32
|
||||
#elif MG_ARCH_UNIX
|
||||
#elif MG_ARCH == MG_ARCH_UNIX
|
||||
FILE *fp = fopen("/dev/urandom", "rb");
|
||||
if (fp != NULL) {
|
||||
if (fread(buf, 1, len, fp) == len) done = true;
|
||||
|
Loading…
Reference in New Issue
Block a user