diff options
author | Bryan Cantrill <bryan@joyent.com> | 2015-02-23 02:11:40 +0000 |
---|---|---|
committer | Bryan Cantrill <bryan@joyent.com> | 2015-02-23 02:11:40 +0000 |
commit | 9a60c13574ff981b3ba0fc66ffc56dcbd66a4408 (patch) | |
tree | 695f6b0357ef3af792f33d991de7ac372ec71eeb /usr/src/lib/libc | |
parent | 4b9682c1db523e53500d1e83dc44f98f925547a7 (diff) | |
download | illumos-joyent-9a60c13574ff981b3ba0fc66ffc56dcbd66a4408.tar.gz |
OS-3899 minor eventfd cleanup
Diffstat (limited to 'usr/src/lib/libc')
-rw-r--r-- | usr/src/lib/libc/port/sys/eventfd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/src/lib/libc/port/sys/eventfd.c b/usr/src/lib/libc/port/sys/eventfd.c index bd2eba4efa..f165491cc1 100644 --- a/usr/src/lib/libc/port/sys/eventfd.c +++ b/usr/src/lib/libc/port/sys/eventfd.c @@ -10,7 +10,7 @@ */ /* - * Copyright (c) 2014, Joyent, Inc. All rights reserved. + * Copyright (c) 2015, Joyent, Inc. All rights reserved. */ #include <sys/eventfd.h> @@ -26,8 +26,10 @@ eventfd(unsigned int initval, int flags) uint64_t val = initval; int fd; - if (flags & ~(EFD_NONBLOCK | EFD_CLOEXEC | EFD_SEMAPHORE)) - return (EINVAL); + if (flags & ~(EFD_NONBLOCK | EFD_CLOEXEC | EFD_SEMAPHORE)) { + errno = EINVAL; + return (-1); + } if (flags & EFD_NONBLOCK) oflags |= O_NONBLOCK; |