Make message buffer static

Now that the message max size is 256k, do not put the buffer on the
stack.
This commit is contained in:
Romain Vimont 2020-06-04 23:50:08 +02:00
parent 488d22d4e2
commit 1e4ee547b5
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,7 @@ controller_push_msg(struct controller *controller,
static bool
process_msg(struct controller *controller,
const struct control_msg *msg) {
unsigned char serialized_msg[CONTROL_MSG_MAX_SIZE];
static unsigned char serialized_msg[CONTROL_MSG_MAX_SIZE];
int length = control_msg_serialize(msg, serialized_msg);
if (!length) {
return false;

View file

@ -60,7 +60,7 @@ static int
run_receiver(void *data) {
struct receiver *receiver = data;
unsigned char buf[DEVICE_MSG_MAX_SIZE];
static unsigned char buf[DEVICE_MSG_MAX_SIZE];
size_t head = 0;
for (;;) {