summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-11-05 03:13:55 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2011-11-05 03:13:55 +0100
commit10edbbb927e6a573f9b21b15fcc10cefae01fdd7 (patch)
tree64622f503e408c189f3f7cb9dc61e6bb83828a76
parent7335a4234aa9521954333526bff7f996f1df4d1e (diff)
downloadnodejs-10edbbb927e6a573f9b21b15fcc10cefae01fdd7.tar.gz
nodejs-10edbbb927e6a573f9b21b15fcc10cefae01fdd7.tar.bz2
nodejs-10edbbb927e6a573f9b21b15fcc10cefae01fdd7.zip
uv: upgrade to c468e2a
-rw-r--r--deps/uv/src/unix/linux.c18
-rw-r--r--deps/uv/test/test-fs.c8
2 files changed, 14 insertions, 12 deletions
diff --git a/deps/uv/src/unix/linux.c b/deps/uv/src/unix/linux.c
index aa16f9810..f91839f7f 100644
--- a/deps/uv/src/unix/linux.c
+++ b/deps/uv/src/unix/linux.c
@@ -158,7 +158,7 @@ int uv_fs_event_init(uv_loop_t* loop,
const char* filename,
uv_fs_event_cb cb,
int flags) {
- int flags;
+ int events;
int fd;
/* We don't support any flags yet. */
@@ -174,15 +174,15 @@ int uv_fs_event_init(uv_loop_t* loop,
return -1;
}
- flags = IN_ATTRIB
- | IN_CREATE
- | IN_MODIFY
- | IN_DELETE
- | IN_DELETE_SELF
- | IN_MOVED_FROM
- | IN_MOVED_TO;
+ events = IN_ATTRIB
+ | IN_CREATE
+ | IN_MODIFY
+ | IN_DELETE
+ | IN_DELETE_SELF
+ | IN_MOVED_FROM
+ | IN_MOVED_TO;
- if (inotify_add_watch(fd, filename, flags) == -1) {
+ if (inotify_add_watch(fd, filename, events) == -1) {
uv__set_sys_error(loop, errno);
uv__close(fd);
return -1;
diff --git a/deps/uv/test/test-fs.c b/deps/uv/test/test-fs.c
index 5d6e11f0f..28b914a77 100644
--- a/deps/uv/test/test-fs.c
+++ b/deps/uv/test/test-fs.c
@@ -1435,7 +1435,7 @@ TEST_IMPL(fs_file_open_append) {
ASSERT(close_req.result != -1);
uv_fs_req_cleanup(&close_req);
- r = uv_fs_open(loop, &open_req1, "test_file", _O_RDWR | O_APPEND, 0, NULL);
+ r = uv_fs_open(loop, &open_req1, "test_file", O_RDWR | O_APPEND, 0, NULL);
ASSERT(r != -1);
ASSERT(open_req1.result != -1);
uv_fs_req_cleanup(&open_req1);
@@ -1461,7 +1461,9 @@ TEST_IMPL(fs_file_open_append) {
printf("read = %d\n", r);
ASSERT(r == 26);
ASSERT(read_req.result == 26);
- ASSERT(memcmp(buf, "test-buffer\n\0test-buffer\n\0", sizeof(buf)) == 0);
+ ASSERT(memcmp(buf,
+ "test-buffer\n\0test-buffer\n\0",
+ sizeof("test-buffer\n\0test-buffer\n\0") - 1) == 0);
uv_fs_req_cleanup(&read_req);
r = uv_fs_close(loop, &close_req, open_req1.result, NULL);
@@ -1473,4 +1475,4 @@ TEST_IMPL(fs_file_open_append) {
unlink("test_file");
return 0;
-} \ No newline at end of file
+}