diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-10-13 20:37:23 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-10-13 20:37:23 +0200 |
commit | 78f8f18e48d25547e837630d8317ef029bba6d72 (patch) | |
tree | 8e6055aeec0b27733ff53804d13c98ed4e61dafd /shared/bin.c | |
parent | 385b47211ea8674f97f014537d694bb2efbd6ab9 (diff) |
more protocol parsing done
Diffstat (limited to 'shared/bin.c')
-rw-r--r-- | shared/bin.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/shared/bin.c b/shared/bin.c new file mode 100644 index 0000000..def2aa8 --- /dev/null +++ b/shared/bin.c @@ -0,0 +1,11 @@ +#include <stdlib.h> +#include <stdint.h> +#include <memory.h> + +#include "bin.h" + +ws_s_bin *ws_bin_s_alloc(uint16_t bytes) { + ws_s_bin *temp = malloc(sizeof(ws_s_bin) + sizeof(uint8_t) * bytes); + temp->bytes = bytes; + return temp; +} |