Fix return values used in mq_open
This commit is contained in:
parent
df5a0e339c
commit
58ce9ca12b
1 changed files with 2 additions and 2 deletions
|
@ -43,10 +43,10 @@ int mq_open(const char *name, int oflag)
|
|||
mqd_t mqd;
|
||||
|
||||
if (mq.num_queues == MAX_QUEUES)
|
||||
return (mqd_t) -1;
|
||||
return EMQUEUEFULL;
|
||||
|
||||
if (strlen(name) > NAME_SIZE)
|
||||
return (mqd_t) -1;
|
||||
return EINVAL;
|
||||
|
||||
for (int i = 0; i < MAX_QUEUES; i++)
|
||||
if (mq.queue_slot_empty[i] == NOT_EMPTY)
|
||||
|
|
Loading…
Reference in a new issue