From 58ce9ca12ba14416dc835927c2db686377129b43 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Tue, 15 Mar 2016 19:51:08 +0530 Subject: [PATCH] Fix return values used in mq_open --- minix/kernel/mqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minix/kernel/mqueue.c b/minix/kernel/mqueue.c index ff18f7c6f..efe38f334 100644 --- a/minix/kernel/mqueue.c +++ b/minix/kernel/mqueue.c @@ -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)