Chromium Code Reviews| Index: tests/irt_ext/file_desc.c |
| diff --git a/tests/irt_ext/file_desc.c b/tests/irt_ext/file_desc.c |
| index bf163e8555298f65155a723f81b67781837b9389..7d83a070d358e29c9e407c10684babc0dbd2a365 100644 |
| --- a/tests/irt_ext/file_desc.c |
| +++ b/tests/irt_ext/file_desc.c |
| @@ -8,11 +8,11 @@ |
| #include <fcntl.h> |
| #include <string.h> |
| -#include "native_client/tests/irt_ext/file_desc.h" |
| #include "native_client/src/include/nacl_assert.h" |
| #include "native_client/src/include/nacl_macros.h" |
| #include "native_client/src/untrusted/irt/irt_dev.h" |
| #include "native_client/src/untrusted/irt/irt_extension.h" |
| +#include "native_client/tests/irt_ext/file_desc.h" |
| static struct file_desc_environment *g_activated_env = NULL; |
| static const struct inode_data g_default_inode = { |
| @@ -279,6 +279,7 @@ static int my_utimes(const char *filename, const struct timeval *times) { |
| /* Module file_desc functions. */ |
| void init_file_desc_module(void) { |
| + size_t size; |
|
Roland McGrath
2014/08/28 23:27:42
Use C99 style rather than predeclaring a local
David Yen
2014/08/29 16:43:33
Done.
|
| struct nacl_irt_dev_fdio fdio = { |
| my_close, |
| my_dup, |
| @@ -296,18 +297,9 @@ void init_file_desc_module(void) { |
| my_isatty, |
| }; |
| - /* These tables should have share common prefixes with one another. */ |
| - ASSERT_GT(sizeof(struct nacl_irt_dev_fdio_v0_2), |
| - sizeof(struct nacl_irt_fdio)); |
| - ASSERT_GT(sizeof(struct nacl_irt_dev_fdio), |
| - sizeof(struct nacl_irt_dev_fdio_v0_2)); |
| - |
| - nacl_interface_ext_supply(NACL_IRT_FDIO_v0_1, &fdio, |
| - sizeof(struct nacl_irt_fdio)); |
| - nacl_interface_ext_supply(NACL_IRT_DEV_FDIO_v0_2, &fdio, |
| - sizeof(struct nacl_irt_dev_fdio_v0_2)); |
| - nacl_interface_ext_supply(NACL_IRT_DEV_FDIO_v0_3, &fdio, |
| - sizeof(fdio)); |
| + size = nacl_interface_ext_supply(NACL_IRT_DEV_FDIO_v0_3, &fdio, |
| + sizeof(fdio)); |
| + ASSERT_EQ(size, sizeof(fdio)); |
| struct nacl_irt_dev_filename fname = { |
| my_open, |
| @@ -329,17 +321,9 @@ void init_file_desc_module(void) { |
| }; |
| /* These tables should have share common prefixes with one another. */ |
| - ASSERT_GT(sizeof(struct nacl_irt_dev_filename_v0_2), |
| - sizeof(struct nacl_irt_filename)); |
| - ASSERT_GT(sizeof(struct nacl_irt_dev_filename), |
| - sizeof(struct nacl_irt_dev_filename_v0_2)); |
| - |
| - nacl_interface_ext_supply(NACL_IRT_FILENAME_v0_1, &fname, |
| - sizeof(struct nacl_irt_filename)); |
| - nacl_interface_ext_supply(NACL_IRT_DEV_FILENAME_v0_2, &fname, |
| - sizeof(struct nacl_irt_dev_filename_v0_2)); |
| - nacl_interface_ext_supply(NACL_IRT_DEV_FILENAME_v0_3, &fname, |
| - sizeof(fname)); |
| + size = nacl_interface_ext_supply(NACL_IRT_DEV_FILENAME_v0_3, &fname, |
| + sizeof(fname)); |
| + ASSERT_EQ(size, sizeof(fname)); |
| } |
| void init_inode_data(struct inode_data *inode_data) { |