projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a74348
)
esp32-fix-random
author
Andy Green
<andy@warmcat.com>
Fri, 7 Apr 2017 10:20:21 +0000
(18:20 +0800)
committer
Andy Green
<andy@warmcat.com>
Fri, 7 Apr 2017 10:20:21 +0000
(18:20 +0800)
lib/lws-plat-esp32.c
patch
|
blob
|
history
diff --git
a/lib/lws-plat-esp32.c
b/lib/lws-plat-esp32.c
index
e14d96d
..
c00c933
100644
(file)
--- a/
lib/lws-plat-esp32.c
+++ b/
lib/lws-plat-esp32.c
@@
-38,9
+38,10
@@
unsigned long long time_in_microseconds(void)
LWS_VISIBLE int
lws_get_random(struct lws_context *context, void *buf, int len)
{
+ uint8_t *pb = buf;
while (len) {
uint32_t r = esp_random();
- uint8_t *p = (uint8_t *)&r
, *pb = buf
;
+ uint8_t *p = (uint8_t *)&r;
int b = 4;
if (len < b)