mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-14 01:38:01 +08:00
Fix #1599
This commit is contained in:
parent
4f9cfdf65d
commit
4246e6c768
@ -192,7 +192,7 @@ struct timeval {
|
||||
// Re-route calloc/free to the FreeRTOS's functions, don't use stdlib
|
||||
static inline void *mg_calloc(int cnt, size_t size) {
|
||||
void *p = pvPortMalloc(cnt * size);
|
||||
if (p != NULL) memset(p, 0, size);
|
||||
if (p != NULL) memset(p, 0, size * cnt);
|
||||
return p;
|
||||
}
|
||||
#define calloc(a, b) mg_calloc((a), (b))
|
||||
@ -262,7 +262,7 @@ static inline void *mg_calloc(int cnt, size_t size) {
|
||||
// Re-route calloc/free to the FreeRTOS's functions, don't use stdlib
|
||||
static inline void *mg_calloc(int cnt, size_t size) {
|
||||
void *p = pvPortMalloc(cnt * size);
|
||||
if (p != NULL) memset(p, 0, size);
|
||||
if (p != NULL) memset(p, 0, size * cnt);
|
||||
return p;
|
||||
}
|
||||
#define calloc(a, b) mg_calloc((a), (b))
|
||||
|
@ -32,7 +32,7 @@ struct timeval {
|
||||
// Re-route calloc/free to the FreeRTOS's functions, don't use stdlib
|
||||
static inline void *mg_calloc(int cnt, size_t size) {
|
||||
void *p = pvPortMalloc(cnt * size);
|
||||
if (p != NULL) memset(p, 0, size);
|
||||
if (p != NULL) memset(p, 0, size * cnt);
|
||||
return p;
|
||||
}
|
||||
#define calloc(a, b) mg_calloc((a), (b))
|
||||
|
@ -50,7 +50,7 @@
|
||||
// Re-route calloc/free to the FreeRTOS's functions, don't use stdlib
|
||||
static inline void *mg_calloc(int cnt, size_t size) {
|
||||
void *p = pvPortMalloc(cnt * size);
|
||||
if (p != NULL) memset(p, 0, size);
|
||||
if (p != NULL) memset(p, 0, size * cnt);
|
||||
return p;
|
||||
}
|
||||
#define calloc(a, b) mg_calloc((a), (b))
|
||||
|
Loading…
x
Reference in New Issue
Block a user