[util] fix msgq
This commit is contained in:
parent
932e7fc708
commit
0a07bac2e7
|
@ -44,8 +44,13 @@ void* msgq_recv1(struct msgq* mq, int* out_type)
|
|||
if (mq->head == NULL) {
|
||||
return NULL;
|
||||
} else {
|
||||
int type = mq->head->type;
|
||||
void* pl = mq->head->payload;
|
||||
mq->head = mq->head->next;
|
||||
|
||||
if (out_type != NULL) {
|
||||
*out_type = type;
|
||||
}
|
||||
return pl;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue