This commit is contained in:
Sergey Lyubka committed 2022-06-21 12:07:00 +01:00
1 parent 4f9cfdf65d
commit 4246e6c768
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -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))
+1 -1
View File
@@ -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))
+1 -1
View File
@@ -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))