Fix return values used in mq_open

This commit is contained in:
Sanchayan Maity 2016-03-15 19:51:08 +05:30
parent df5a0e339c
commit 58ce9ca12b

View file

@ -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)