ext/libuv/src/unix/linux-inotify.c in libuv-4.0.0 vs ext/libuv/src/unix/linux-inotify.c in libuv-4.0.1

- old
+ new

@@ -71,15 +71,15 @@ fd = uv__inotify_init1(UV__IN_NONBLOCK | UV__IN_CLOEXEC); if (fd != -1) return fd; if (errno != ENOSYS) - return -errno; + return UV__ERR(errno); fd = uv__inotify_init(); if (fd == -1) - return -errno; + return UV__ERR(errno); err = uv__cloexec(fd, 1); if (err == 0) err = uv__nonblock(fd, 1); @@ -281,11 +281,11 @@ int events; int err; int wd; if (uv__is_active(handle)) - return -EINVAL; + return UV_EINVAL; err = init_inotify(handle->loop); if (err) return err; @@ -298,18 +298,18 @@ | UV__IN_MOVED_FROM | UV__IN_MOVED_TO; wd = uv__inotify_add_watch(handle->loop->inotify_fd, path, events); if (wd == -1) - return -errno; + return UV__ERR(errno); w = find_watcher(handle->loop, wd); if (w) goto no_insert; w = uv__malloc(sizeof(*w) + strlen(path) + 1); if (w == NULL) - return -ENOMEM; + return UV_ENOMEM; w->wd = wd; w->path = strcpy((char*)(w + 1), path); QUEUE_INIT(&w->watchers); w->iterating = 0;