diff options
Diffstat (limited to 'code/fe310/eos/msgq.c')
-rw-r--r-- | code/fe310/eos/msgq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/code/fe310/eos/msgq.c b/code/fe310/eos/msgq.c index 98ec4aa..d0fe405 100644 --- a/code/fe310/eos/msgq.c +++ b/code/fe310/eos/msgq.c @@ -1,4 +1,5 @@ -#include <stddef.h> +#include <stdlib.h> +#include <stdint.h> #include <string.h> #include "eos.h" @@ -44,7 +45,7 @@ void eos_msgq_pop(EOSMsgQ *msgq, unsigned char *type, unsigned char **buffer, ui int eos_msgq_get(EOSMsgQ *msgq, unsigned char type, unsigned char *selector, uint16_t sel_len, unsigned char **buffer, uint16_t *len) { uint8_t i, j, idx; - + if (msgq->idx_r == msgq->idx_w) { *buffer = NULL; *len = 0; |