Permalink
Browse files

test: fix memory buffer comparison

  • Loading branch information...
1 parent 9dc67f5 commit c468e2ab8836d87a627a13709b200861c08818db @bnoordhuis bnoordhuis committed Nov 5, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 test/test-fs.c
View
@@ -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);

0 comments on commit c468e2a

Please sign in to comment.