ext/libuv/src/unix/kqueue.c in libuv-4.0.1 vs ext/libuv/src/unix/kqueue.c in libuv-4.0.2

- old
+ new

@@ -49,11 +49,11 @@ int uv__kqueue_init(uv_loop_t* loop) { loop->backend_fd = kqueue(); if (loop->backend_fd == -1) - return UV__ERR(errno); + return -errno; uv__cloexec(loop->backend_fd, 1); return 0; } @@ -96,11 +96,11 @@ int rc; rc = 0; EV_SET(&ev, fd, EVFILT_READ, EV_ADD, 0, 0, 0); if (kevent(loop->backend_fd, &ev, 1, NULL, 0, NULL)) - rc = UV__ERR(errno); + rc = -errno; EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, 0); if (rc == 0) if (kevent(loop->backend_fd, &ev, 1, NULL, 0, NULL)) abort(); @@ -456,15 +456,15 @@ struct stat statbuf; #endif /* defined(__APPLE__) */ int fd; if (uv__is_active(handle)) - return UV_EINVAL; + return -EINVAL; /* TODO open asynchronously - but how do we report back errors? */ fd = open(path, O_RDONLY); if (fd == -1) - return UV__ERR(errno); + return -errno; uv__handle_start(handle); uv__io_init(&handle->event_watcher, uv__fs_event, fd); handle->path = uv__strdup(path); handle->cb = cb;