summaryrefslogtreecommitdiff
path: root/deps/uv/test/test-fs-event.c
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2014-04-07 16:36:51 +0400
committerFedor Indutny <fedor@indutny.com>2014-04-07 16:36:51 +0400
commit962f96d3416ee00c78e729bc1c1b05e02d0c1ef2 (patch)
tree54b04b551eaa04e280f416b106c0de5c29b39bda /deps/uv/test/test-fs-event.c
parent95dbb6bf647d90947c0c738533dadf391559be98 (diff)
downloadandroid-node-v8-962f96d3416ee00c78e729bc1c1b05e02d0c1ef2.tar.gz
android-node-v8-962f96d3416ee00c78e729bc1c1b05e02d0c1ef2.tar.bz2
android-node-v8-962f96d3416ee00c78e729bc1c1b05e02d0c1ef2.zip
deps: update libuv to v0.11.23
Diffstat (limited to 'deps/uv/test/test-fs-event.c')
-rw-r--r--deps/uv/test/test-fs-event.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/deps/uv/test/test-fs-event.c b/deps/uv/test/test-fs-event.c
index fec5fd6731..5fd8da430b 100644
--- a/deps/uv/test/test-fs-event.c
+++ b/deps/uv/test/test-fs-event.c
@@ -50,7 +50,7 @@ static char fs_event_filename[1024];
#endif /* defined(PATH_MAX) */
static int timer_cb_touch_called;
-static void fs_event_unlink_files(uv_timer_t* handle, int status);
+static void fs_event_unlink_files(uv_timer_t* handle);
static void create_dir(uv_loop_t* loop, const char* name) {
int r;
@@ -147,7 +147,7 @@ static const char* fs_event_get_filename(int i) {
return fs_event_filename;
}
-static void fs_event_create_files(uv_timer_t* handle, int status) {
+static void fs_event_create_files(uv_timer_t* handle) {
int i;
/* Already created all files */
@@ -164,7 +164,7 @@ static void fs_event_create_files(uv_timer_t* handle, int status) {
ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files, 50, 0));
}
-void fs_event_unlink_files(uv_timer_t* handle, int status) {
+void fs_event_unlink_files(uv_timer_t* handle) {
int r;
int i;
@@ -193,11 +193,10 @@ static void fs_event_cb_file(uv_fs_event_t* handle, const char* filename,
uv_close((uv_handle_t*)handle, close_cb);
}
-static void timer_cb_close_handle(uv_timer_t* timer, int status) {
+static void timer_cb_close_handle(uv_timer_t* timer) {
uv_handle_t* handle;
ASSERT(timer != NULL);
- ASSERT(status == 0);
handle = timer->data;
uv_close((uv_handle_t*)timer, NULL);
@@ -223,7 +222,7 @@ static void fs_event_cb_file_current_dir(uv_fs_event_t* handle,
}
}
-static void timer_cb_file(uv_timer_t* handle, int status) {
+static void timer_cb_file(uv_timer_t* handle) {
++timer_cb_called;
if (timer_cb_called == 1) {
@@ -234,14 +233,13 @@ static void timer_cb_file(uv_timer_t* handle, int status) {
}
}
-static void timer_cb_touch(uv_timer_t* timer, int status) {
- ASSERT(status == 0);
+static void timer_cb_touch(uv_timer_t* timer) {
uv_close((uv_handle_t*)timer, NULL);
touch_file(timer->loop, "watch_file");
timer_cb_touch_called++;
}
-static void timer_cb_watch_twice(uv_timer_t* handle, int status) {
+static void timer_cb_watch_twice(uv_timer_t* handle) {
uv_fs_event_t* handles = handle->data;
uv_close((uv_handle_t*) (handles + 0), NULL);
uv_close((uv_handle_t*) (handles + 1), NULL);
@@ -253,7 +251,7 @@ TEST_IMPL(fs_event_watch_dir) {
int r;
/* Setup */
- fs_event_unlink_files(NULL, 0);
+ fs_event_unlink_files(NULL);
remove("watch_dir/file2");
remove("watch_dir/file1");
remove("watch_dir/");
@@ -275,7 +273,7 @@ TEST_IMPL(fs_event_watch_dir) {
ASSERT(close_cb_called == 2);
/* Cleanup */
- fs_event_unlink_files(NULL, 0);
+ fs_event_unlink_files(NULL);
remove("watch_dir/file2");
remove("watch_dir/file1");
remove("watch_dir/");
@@ -458,11 +456,9 @@ static void fs_event_fail(uv_fs_event_t* handle, const char* filename,
}
-static void timer_cb(uv_timer_t* handle, int status) {
+static void timer_cb(uv_timer_t* handle) {
int r;
- ASSERT(status == 0);
-
r = uv_fs_event_init(handle->loop, &fs_event);
ASSERT(r == 0);
r = uv_fs_event_start(&fs_event, fs_event_fail, ".", 0);
@@ -672,7 +668,7 @@ static void fs_event_error_report_cb(uv_fs_event_t* handle,
fs_event_error_reported = status;
}
-static void timer_cb_nop(uv_timer_t* handle, int status) {
+static void timer_cb_nop(uv_timer_t* handle) {
++timer_cb_called;
uv_close((uv_handle_t*) handle, close_cb);
}