stm32f7 example starts on real h/w, with plus-TCP driver

This commit is contained in:
cpq committed 2021-05-17 17:36:57 +01:00
1 parent 0f32f50c50
commit 47e5e984df
30 files changed
+3716 -1257

No files matched your search

+2 -2
View File
@@ -19,9 +19,9 @@ int mg_iobuf_resize(struct mg_iobuf *io, size_t new_size) {
io->buf = NULL;
io->len = io->size = 0;
} else if (new_size != io->size) {
// NOTE(lsm): do not use realloc here. Use malloc/free only, to ease the
// NOTE(lsm): do not use realloc here. Use calloc/free only, to ease the
// porting to some obscure platforms like FreeRTOS
void *p = malloc(new_size);
void *p = calloc(1, new_size);
if (p != NULL) {
size_t len = new_size < io->len ? new_size : io->len;
if (len > 0) memcpy(p, io->buf, len);