diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-01-07 22:07:57 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-01-07 22:07:57 +0100 |
commit | 456efce00c0ed85061352a38edddc0a3f39c7804 (patch) | |
tree | d2d7c0a821b5c9e07d4ca24dd34f48b4038d3ca2 /shared/bin.h | |
parent | aacaa86e621b18103f5ebf0bfe56f302d258c0e8 (diff) |
change malloc and free to use macro's
Diffstat (limited to 'shared/bin.h')
-rw-r--r-- | shared/bin.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shared/bin.h b/shared/bin.h index 7506655..4a932c2 100644 --- a/shared/bin.h +++ b/shared/bin.h @@ -10,7 +10,8 @@ */ #include <stdint.h> -#include <malloc.h> + +#include "memory.h" #ifdef __cplusplus extern "C" { @@ -23,7 +24,7 @@ extern uint8_t g_cd_endianness; #define CD_CREATE_MSG_BIN(type, normal, bin) CD_CREATE_MSG_SIZE_BIN(type, sizeof(type), normal, bin) /** @brief */ #define CD_CREATE_MSG_SIZE_BIN(type, size, normal, bin) \ - cd_s_bin *bin = malloc(sizeof(cd_s_bin) + size); \ + cd_s_bin *bin = CD_MALLOC(sizeof(cd_s_bin) + size); \ bin->bytes = size; \ type *normal = (type *)&bin->data; |