diff options
author | Craig Tiller <ctiller@google.com> | 2017-02-27 15:58:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 15:58:23 -0800 |
commit | cd232f64c634cba1e95b30db5d270114db6b1fc4 (patch) | |
tree | c009004932fc91897d8ae36c5183362f3c47af43 /test/core/iomgr | |
parent | 79ccb81b48433df9d56601663851a30de4ea8a6a (diff) | |
parent | b4673fa9ec493deb4b7d2e811654812449f1077e (diff) |
Merge pull request #9753 from ctiller/zalloc
Add zalloc, convert a bunch of files to use it
Diffstat (limited to 'test/core/iomgr')
-rw-r--r-- | test/core/iomgr/endpoint_pair_test.c | 2 | ||||
-rw-r--r-- | test/core/iomgr/ev_epoll_linux_test.c | 2 | ||||
-rw-r--r-- | test/core/iomgr/fd_posix_test.c | 2 | ||||
-rw-r--r-- | test/core/iomgr/pollset_set_test.c | 2 | ||||
-rw-r--r-- | test/core/iomgr/resolve_address_posix_test.c | 2 | ||||
-rw-r--r-- | test/core/iomgr/resolve_address_test.c | 2 | ||||
-rw-r--r-- | test/core/iomgr/tcp_client_posix_test.c | 2 | ||||
-rw-r--r-- | test/core/iomgr/tcp_posix_test.c | 2 | ||||
-rw-r--r-- | test/core/iomgr/tcp_server_posix_test.c | 2 | ||||
-rw-r--r-- | test/core/iomgr/udp_server_test.c | 2 |
10 files changed, 10 insertions, 10 deletions
diff --git a/test/core/iomgr/endpoint_pair_test.c b/test/core/iomgr/endpoint_pair_test.c index f02171f2ef..4b98ef257e 100644 --- a/test/core/iomgr/endpoint_pair_test.c +++ b/test/core/iomgr/endpoint_pair_test.c @@ -78,7 +78,7 @@ int main(int argc, char **argv) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_test_init(argc, argv); grpc_init(); - g_pollset = gpr_malloc(grpc_pollset_size()); + g_pollset = gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); grpc_endpoint_tests(configs[0], g_pollset, g_mu); grpc_closure_init(&destroyed, destroy_pollset, g_pollset, diff --git a/test/core/iomgr/ev_epoll_linux_test.c b/test/core/iomgr/ev_epoll_linux_test.c index 5b05ea3338..4ec959995b 100644 --- a/test/core/iomgr/ev_epoll_linux_test.c +++ b/test/core/iomgr/ev_epoll_linux_test.c @@ -104,7 +104,7 @@ static void test_fd_cleanup(grpc_exec_ctx *exec_ctx, test_fd *tfds, static void test_pollset_init(test_pollset *pollsets, int num_pollsets) { int i; for (i = 0; i < num_pollsets; i++) { - pollsets[i].pollset = gpr_malloc(grpc_pollset_size()); + pollsets[i].pollset = gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(pollsets[i].pollset, &pollsets[i].mu); } } diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index 4726e935d8..c1a0ef54d3 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -543,7 +543,7 @@ int main(int argc, char **argv) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_test_init(argc, argv); grpc_iomgr_init(); - g_pollset = gpr_malloc(grpc_pollset_size()); + g_pollset = gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); test_grpc_fd(); test_grpc_fd_change(); diff --git a/test/core/iomgr/pollset_set_test.c b/test/core/iomgr/pollset_set_test.c index e7777acce1..f27e9db8c9 100644 --- a/test/core/iomgr/pollset_set_test.c +++ b/test/core/iomgr/pollset_set_test.c @@ -79,7 +79,7 @@ typedef struct test_pollset { static void init_test_pollsets(test_pollset *pollsets, const int num_pollsets) { for (int i = 0; i < num_pollsets; i++) { - pollsets[i].ps = gpr_malloc(grpc_pollset_size()); + pollsets[i].ps = gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(pollsets[i].ps, &pollsets[i].mu); } } diff --git a/test/core/iomgr/resolve_address_posix_test.c b/test/core/iomgr/resolve_address_posix_test.c index ef4cfdf06f..fa88aca431 100644 --- a/test/core/iomgr/resolve_address_posix_test.c +++ b/test/core/iomgr/resolve_address_posix_test.c @@ -63,7 +63,7 @@ static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {} void args_init(grpc_exec_ctx *exec_ctx, args_struct *args) { gpr_event_init(&args->ev); - args->pollset = gpr_malloc(grpc_pollset_size()); + args->pollset = gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(args->pollset, &args->mu); args->pollset_set = grpc_pollset_set_create(); grpc_pollset_set_add_pollset(exec_ctx, args->pollset_set, args->pollset); diff --git a/test/core/iomgr/resolve_address_test.c b/test/core/iomgr/resolve_address_test.c index 3b79ef4e65..ea79adc090 100644 --- a/test/core/iomgr/resolve_address_test.c +++ b/test/core/iomgr/resolve_address_test.c @@ -57,7 +57,7 @@ static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {} void args_init(grpc_exec_ctx *exec_ctx, args_struct *args) { gpr_event_init(&args->ev); - args->pollset = gpr_malloc(grpc_pollset_size()); + args->pollset = gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(args->pollset, &args->mu); args->pollset_set = grpc_pollset_set_create(); grpc_pollset_set_add_pollset(exec_ctx, args->pollset_set, args->pollset); diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c index c767f63f0c..b324b5a65e 100644 --- a/test/core/iomgr/tcp_client_posix_test.c +++ b/test/core/iomgr/tcp_client_posix_test.c @@ -205,7 +205,7 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); g_pollset_set = grpc_pollset_set_create(); - g_pollset = gpr_malloc(grpc_pollset_size()); + g_pollset = gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); grpc_pollset_set_add_pollset(&exec_ctx, g_pollset_set, g_pollset); grpc_exec_ctx_finish(&exec_ctx); diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 99ecd581c6..5a55be888f 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -561,7 +561,7 @@ int main(int argc, char **argv) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_test_init(argc, argv); grpc_init(); - g_pollset = gpr_malloc(grpc_pollset_size()); + g_pollset = gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); grpc_endpoint_tests(configs[0], g_pollset, g_mu); run_tests(); diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index 4a6570015f..efadddc011 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -457,7 +457,7 @@ int main(int argc, char **argv) { test_addrs dst_addrs; grpc_test_init(argc, argv); grpc_init(); - g_pollset = gpr_malloc(grpc_pollset_size()); + g_pollset = gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); test_no_op(); diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index ba572017a2..d57a37b2a9 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -237,7 +237,7 @@ int main(int argc, char **argv) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_test_init(argc, argv); grpc_init(); - g_pollset = gpr_malloc(grpc_pollset_size()); + g_pollset = gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); test_no_op(); |