From 856d0948daf8aee6f85b1e4864909f10f4b65ab2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 Nov 2015 14:14:12 +0000 Subject: [PATCH] Check return values --- test/core/transport/chttp2/hpack_table_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c index aa3e273a6c9..2e336aa8544 100644 --- a/test/core/transport/chttp2/hpack_table_test.c +++ b/test/core/transport/chttp2/hpack_table_test.c @@ -145,7 +145,7 @@ static void test_many_additions(void) { for (i = 0; i < 1000000; i++) { gpr_asprintf(&key, "K:%d", i); gpr_asprintf(&value, "VALUE:%d", i); - grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, key, value)); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, key, value))); assert_index(&tbl, 1 + GRPC_CHTTP2_LAST_STATIC_ENTRY, key, value); gpr_free(key); gpr_free(value); @@ -182,9 +182,9 @@ static void test_find(void) { mdctx = grpc_mdctx_create(); grpc_chttp2_hptbl_init(&tbl, mdctx); - grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, "abc", "xyz")); - grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, "abc", "123")); - grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, "x", "1")); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, "abc", "xyz"))); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, "abc", "123"))); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, "x", "1"))); r = find_simple(&tbl, "abc", "123"); GPR_ASSERT(r.index == 2 + GRPC_CHTTP2_LAST_STATIC_ENTRY); @@ -233,8 +233,8 @@ static void test_find(void) { /* overflow the string buffer, check find still works */ for (i = 0; i < 10000; i++) { gpr_ltoa(i, buffer); - grpc_chttp2_hptbl_add(&tbl, - grpc_mdelem_from_strings(mdctx, "test", buffer)); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, + grpc_mdelem_from_strings(mdctx, "test", buffer))); } r = find_simple(&tbl, "abc", "123");