about summary refs log tree commit diff
path: root/src/mq/mq_open.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-06-07 15:07:54 -0400
committerRich Felker <dalias@aerifal.cx>2011-06-07 15:07:54 -0400
commite1d2a8e2394640e4b573117b7653fd0f163671fe (patch)
tree24369bbad819333e0e8bdd7a544b0aad4a6ff189 /src/mq/mq_open.c
parent2b0cedac8d03bbeb1bd0e1d77fab775b1d9f3e25 (diff)
downloadmusl-e1d2a8e2394640e4b573117b7653fd0f163671fe.tar.gz
musl-e1d2a8e2394640e4b573117b7653fd0f163671fe.tar.xz
musl-e1d2a8e2394640e4b573117b7653fd0f163671fe.zip
mq names without leading / have impl-def behavior; allowing them is easier
Diffstat (limited to 'src/mq/mq_open.c')
-rw-r--r--src/mq/mq_open.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mq/mq_open.c b/src/mq/mq_open.c
index 57220a2b..aa91d589 100644
--- a/src/mq/mq_open.c
+++ b/src/mq/mq_open.c
@@ -1,6 +1,5 @@
 #include <mqueue.h>
 #include <fcntl.h>
-#include <errno.h>
 #include <stdarg.h>
 #include "syscall.h"
 
@@ -8,10 +7,7 @@ mqd_t mq_open(const char *name, int flags, ...)
 {
 	mode_t mode = 0;
 	struct mq_attr *attr = 0;
-	if (*name++ != '/') {
-		errno = EINVAL;
-		return -1;
-	}
+	if (*name == '/') name++;
 	if (flags & O_CREAT) {
 		va_list ap;
 		va_start(ap, flags);