From 555e5d2c0ce77dd1e031690c98ec9a1366182347 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 29 May 2022 22:35:04 +0200 Subject: `make format` --- shared/bin.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'shared') diff --git a/shared/bin.h b/shared/bin.h index a849d53..4f7db81 100644 --- a/shared/bin.h +++ b/shared/bin.h @@ -13,13 +13,12 @@ extern uint8_t g_w2_endianness; -#define W2_CAST_BIN(type, in, out) type *out = (type*) &in->data; -#define W2_CREATE_MSG_BIN(type, normal, bin) \ - W2_CREATE_MSG_SIZE_BIN(type, sizeof(type), normal, bin) -#define W2_CREATE_MSG_SIZE_BIN(type, size, normal, bin) \ - w2_s_bin* bin = malloc(sizeof(w2_s_bin) + size); \ - bin->bytes = size; \ - type* normal = (type*) &bin->data; +#define W2_CAST_BIN(type, in, out) type *out = (type *)&in->data; +#define W2_CREATE_MSG_BIN(type, normal, bin) W2_CREATE_MSG_SIZE_BIN(type, sizeof(type), normal, bin) +#define W2_CREATE_MSG_SIZE_BIN(type, size, normal, bin) \ + w2_s_bin *bin = malloc(sizeof(w2_s_bin) + size); \ + bin->bytes = size; \ + type *normal = (type *)&bin->data; typedef struct { uint16_t bytes; -- cgit v1.2.3