diff options
Diffstat (limited to 'src/core/lib')
24 files changed, 74 insertions, 53 deletions
diff --git a/src/core/lib/http/httpcli.cc b/src/core/lib/http/httpcli.cc index 4b10a624da..73b484b06d 100644 --- a/src/core/lib/http/httpcli.cc +++ b/src/core/lib/http/httpcli.cc @@ -136,8 +136,8 @@ static void on_read(grpc_exec_ctx* exec_ctx, void* user_data, for (i = 0; i < req->incoming.count; i++) { if (GRPC_SLICE_LENGTH(req->incoming.slices[i])) { req->have_read_byte = 1; - grpc_error* err = - grpc_http_parser_parse(&req->parser, req->incoming.slices[i], nullptr); + grpc_error* err = grpc_http_parser_parse( + &req->parser, req->incoming.slices[i], nullptr); if (err != GRPC_ERROR_NONE) { finish(exec_ctx, req, err); return; diff --git a/src/core/lib/iomgr/error.cc b/src/core/lib/iomgr/error.cc index d4cc1ac52b..581b903f1a 100644 --- a/src/core/lib/iomgr/error.cc +++ b/src/core/lib/iomgr/error.cc @@ -767,8 +767,8 @@ grpc_error* grpc_os_error(const char* file, int line, int err, grpc_error_set_str( grpc_error_set_int( grpc_error_create(file, line, - grpc_slice_from_static_string("OS Error"), nullptr, - 0), + grpc_slice_from_static_string("OS Error"), + nullptr, 0), GRPC_ERROR_INT_ERRNO, err), GRPC_ERROR_STR_OS_ERROR, grpc_slice_from_static_string(strerror(err))), diff --git a/src/core/lib/iomgr/sockaddr_utils.cc b/src/core/lib/iomgr/sockaddr_utils.cc index e01dc4e65c..3477fb52cd 100644 --- a/src/core/lib/iomgr/sockaddr_utils.cc +++ b/src/core/lib/iomgr/sockaddr_utils.cc @@ -167,8 +167,8 @@ int grpc_sockaddr_to_string(char** out, port = ntohs(addr6->sin6_port); sin6_scope_id = addr6->sin6_scope_id; } - if (ip != nullptr && - grpc_inet_ntop(addr->sa_family, ip, ntop_buf, sizeof(ntop_buf)) != nullptr) { + if (ip != nullptr && grpc_inet_ntop(addr->sa_family, ip, ntop_buf, + sizeof(ntop_buf)) != nullptr) { if (sin6_scope_id != 0) { char* host_with_scope; /* Enclose sin6_scope_id with the format defined in RFC 6784 section 2. */ diff --git a/src/core/lib/iomgr/socket_utils_common_posix.cc b/src/core/lib/iomgr/socket_utils_common_posix.cc index d87aba3af2..2d4b8f0add 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.cc +++ b/src/core/lib/iomgr/socket_utils_common_posix.cc @@ -263,8 +263,8 @@ static grpc_error* error_for_fd(int fd, const grpc_resolved_address* addr) { grpc_error* grpc_create_dualstack_socket( const grpc_resolved_address* resolved_addr, int type, int protocol, grpc_dualstack_mode* dsmode, int* newfd) { - return grpc_create_dualstack_socket_using_factory(nullptr, resolved_addr, type, - protocol, dsmode, newfd); + return grpc_create_dualstack_socket_using_factory( + nullptr, resolved_addr, type, protocol, dsmode, newfd); } static int create_socket(grpc_socket_factory* factory, int domain, int type, diff --git a/src/core/lib/iomgr/tcp_client_posix.cc b/src/core/lib/iomgr/tcp_client_posix.cc index 85a4c29497..cb0f627c94 100644 --- a/src/core/lib/iomgr/tcp_client_posix.cc +++ b/src/core/lib/iomgr/tcp_client_posix.cc @@ -296,8 +296,8 @@ static void tcp_client_connect_impl(grpc_exec_ctx* exec_ctx, } if (errno != EWOULDBLOCK && errno != EINPROGRESS) { - grpc_fd_orphan(exec_ctx, fdobj, nullptr, nullptr, false /* already_closed */, - "tcp_client_connect_error"); + grpc_fd_orphan(exec_ctx, fdobj, nullptr, nullptr, + false /* already_closed */, "tcp_client_connect_error"); GRPC_CLOSURE_SCHED(exec_ctx, closure, GRPC_OS_ERROR(errno, "connect")); goto done; } diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc index 104d233c15..cb90933e31 100644 --- a/src/core/lib/iomgr/tcp_posix.cc +++ b/src/core/lib/iomgr/tcp_posix.cc @@ -198,7 +198,8 @@ static void cover_self(grpc_exec_ctx* exec_ctx, grpc_tcp* tcp) { grpc_executor_scheduler(GRPC_EXECUTOR_LONG)), GRPC_ERROR_NONE); } else { - while ((p = (backup_poller*)gpr_atm_acq_load(&g_backup_poller)) == nullptr) { + while ((p = (backup_poller*)gpr_atm_acq_load(&g_backup_poller)) == + nullptr) { // spin waiting for backup poller } } diff --git a/src/core/lib/security/credentials/composite/composite_credentials.cc b/src/core/lib/security/credentials/composite/composite_credentials.cc index 867b851dc1..93dd721240 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.cc +++ b/src/core/lib/security/credentials/composite/composite_credentials.cc @@ -224,7 +224,8 @@ static grpc_security_status composite_channel_create_security_connector( downstream. */ if (call_creds != nullptr) { grpc_call_credentials* composite_call_creds = - grpc_composite_call_credentials_create(c->call_creds, call_creds, nullptr); + grpc_composite_call_credentials_create(c->call_creds, call_creds, + nullptr); status = c->inner_creds->vtable->create_security_connector( exec_ctx, c->inner_creds, composite_call_creds, target, args, sc, new_args); @@ -253,7 +254,8 @@ grpc_channel_credentials* grpc_composite_channel_credentials_create( void* reserved) { grpc_composite_channel_credentials* c = (grpc_composite_channel_credentials*)gpr_zalloc(sizeof(*c)); - GPR_ASSERT(channel_creds != nullptr && call_creds != nullptr && reserved == nullptr); + GPR_ASSERT(channel_creds != nullptr && call_creds != nullptr && + reserved == nullptr); GRPC_API_TRACE( "grpc_composite_channel_credentials_create(channel_creds=%p, " "call_creds=%p, reserved=%p)", diff --git a/src/core/lib/security/credentials/credentials.cc b/src/core/lib/security/credentials/credentials.cc index b29abdc6aa..90576e69b9 100644 --- a/src/core/lib/security/credentials/credentials.cc +++ b/src/core/lib/security/credentials/credentials.cc @@ -117,7 +117,8 @@ bool grpc_call_credentials_get_request_metadata( void grpc_call_credentials_cancel_get_request_metadata( grpc_exec_ctx* exec_ctx, grpc_call_credentials* creds, grpc_credentials_mdelem_array* md_array, grpc_error* error) { - if (creds == nullptr || creds->vtable->cancel_get_request_metadata == nullptr) { + if (creds == nullptr || + creds->vtable->cancel_get_request_metadata == nullptr) { return; } creds->vtable->cancel_get_request_metadata(exec_ctx, creds, md_array, error); @@ -206,7 +207,8 @@ void grpc_server_credentials_unref(grpc_exec_ctx* exec_ctx, if (creds->vtable->destruct != nullptr) { creds->vtable->destruct(exec_ctx, creds); } - if (creds->processor.destroy != nullptr && creds->processor.state != nullptr) { + if (creds->processor.destroy != nullptr && + creds->processor.state != nullptr) { creds->processor.destroy(creds->processor.state); } gpr_free(creds); @@ -238,7 +240,8 @@ void grpc_server_credentials_set_auth_metadata_processor( "processor=grpc_auth_metadata_processor { process: %p, state: %p })", 3, (creds, (void*)(intptr_t)processor.process, processor.state)); if (creds == nullptr) return; - if (creds->processor.destroy != nullptr && creds->processor.state != nullptr) { + if (creds->processor.destroy != nullptr && + creds->processor.state != nullptr) { creds->processor.destroy(creds->processor.state); } creds->processor = processor; diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc index b4df1dc116..f586c7b604 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc @@ -80,8 +80,8 @@ static void on_compute_engine_detection_http_response(grpc_exec_ctx* exec_ctx, detector->is_done = 1; GRPC_LOG_IF_ERROR( "Pollset kick", - grpc_pollset_kick(exec_ctx, - grpc_polling_entity_pollset(&detector->pollent), nullptr)); + grpc_pollset_kick( + exec_ctx, grpc_polling_entity_pollset(&detector->pollent), nullptr)); gpr_mu_unlock(g_polling_mu); } diff --git a/src/core/lib/security/credentials/jwt/json_token.cc b/src/core/lib/security/credentials/jwt/json_token.cc index 07807201ce..a152ddcaaf 100644 --- a/src/core/lib/security/credentials/jwt/json_token.cc +++ b/src/core/lib/security/credentials/jwt/json_token.cc @@ -52,7 +52,8 @@ gpr_timespec grpc_max_auth_token_lifetime() { /* --- Override for testing. --- */ -static grpc_jwt_encode_and_sign_override g_jwt_encode_and_sign_override = nullptr; +static grpc_jwt_encode_and_sign_override g_jwt_encode_and_sign_override = + nullptr; /* --- grpc_auth_json_key. --- */ @@ -99,7 +100,8 @@ grpc_auth_json_key grpc_auth_json_key_create_from_json(const grpc_json* json) { gpr_log(GPR_ERROR, "Could not write into openssl BIO."); goto end; } - result.private_key = PEM_read_bio_RSAPrivateKey(bio, nullptr, nullptr, (void*)""); + result.private_key = + PEM_read_bio_RSAPrivateKey(bio, nullptr, nullptr, (void*)""); if (result.private_key == nullptr) { gpr_log(GPR_ERROR, "Could not deserialize private key."); goto end; @@ -192,8 +194,8 @@ static char* encoded_jwt_claim(const grpc_auth_json_key* json_key, int64_ttoa(now.tv_sec, now_str); int64_ttoa(expiration.tv_sec, expiration_str); - child = - create_child(nullptr, json, "iss", json_key->client_email, GRPC_JSON_STRING); + child = create_child(nullptr, json, "iss", json_key->client_email, + GRPC_JSON_STRING); if (scope != nullptr) { child = create_child(child, json, "scope", scope, GRPC_JSON_STRING); } else { diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.cc b/src/core/lib/security/credentials/jwt/jwt_verifier.cc index 105178ff4c..3709b83c4e 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.cc +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.cc @@ -576,7 +576,8 @@ static EVP_PKEY* find_verification_key(grpc_exec_ctx* exec_ctx, const char* kty = nullptr; if (jkey->type != GRPC_JSON_OBJECT) continue; - for (key_prop = jkey->child; key_prop != nullptr; key_prop = key_prop->next) { + for (key_prop = jkey->child; key_prop != nullptr; + key_prop = key_prop->next) { if (strcmp(key_prop->key, "alg") == 0 && key_prop->type == GRPC_JSON_STRING) { alg = key_prop->value; @@ -783,7 +784,8 @@ static void retrieve_key_and_verify(grpc_exec_ctx* exec_ctx, req.handshaker = &grpc_httpcli_ssl; http_response_index rsp_idx; - GPR_ASSERT(ctx != nullptr && ctx->header != nullptr && ctx->claims != nullptr); + GPR_ASSERT(ctx != nullptr && ctx->header != nullptr && + ctx->claims != nullptr); iss = ctx->claims->iss; if (ctx->header->kid == nullptr) { gpr_log(GPR_ERROR, "Missing kid in jose header."); @@ -869,7 +871,8 @@ void grpc_jwt_verifier_verify(grpc_exec_ctx* exec_ctx, size_t signed_jwt_len; const char* cur = jwt; - GPR_ASSERT(verifier != nullptr && jwt != nullptr && audience != nullptr && cb != nullptr); + GPR_ASSERT(verifier != nullptr && jwt != nullptr && audience != nullptr && + cb != nullptr); dot = strchr(cur, '.'); if (dot == nullptr) goto error; json = parse_json_part_from_jwt(exec_ctx, cur, (size_t)(dot - cur), diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc index 0ea33de6ca..326f4d7773 100644 --- a/src/core/lib/security/transport/client_auth_filter.cc +++ b/src/core/lib/security/transport/client_auth_filter.cc @@ -146,8 +146,8 @@ void grpc_auth_metadata_context_build( *port_delimiter = '\0'; } } - gpr_asprintf(&service_url, "%s://%s%s", url_scheme == nullptr ? "" : url_scheme, - host_and_port, service); + gpr_asprintf(&service_url, "%s://%s%s", + url_scheme == nullptr ? "" : url_scheme, host_and_port, service); auth_md_context->service_url = service_url; auth_md_context->method_name = method_name; auth_md_context->channel_auth_context = diff --git a/src/core/lib/security/transport/security_connector.cc b/src/core/lib/security/transport/security_connector.cc index 0e89d005a0..b996cc8cdb 100644 --- a/src/core/lib/security/transport/security_connector.cc +++ b/src/core/lib/security/transport/security_connector.cc @@ -600,7 +600,7 @@ static void ssl_channel_add_handshakers(grpc_exec_ctx* exec_ctx, tsi_result result = tsi_ssl_client_handshaker_factory_create_handshaker( c->client_handshaker_factory, c->overridden_target_name != nullptr ? c->overridden_target_name - : c->target_name, + : c->target_name, &tsi_hs); if (result != TSI_OK) { gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.", @@ -911,7 +911,8 @@ static bool ssl_channel_check_call_host(grpc_exec_ctx* exec_ctx, /* If the target name was overridden, then the original target_name was 'checked' transitively during the previous peer check at the end of the handshake. */ - if (c->overridden_target_name != nullptr && strcmp(host, c->target_name) == 0) { + if (c->overridden_target_name != nullptr && + strcmp(host, c->target_name) == 0) { status = GRPC_SECURITY_OK; } if (status != GRPC_SECURITY_OK) { diff --git a/src/core/lib/slice/slice_intern.cc b/src/core/lib/slice/slice_intern.cc index 4ceb712904..e8949135c0 100644 --- a/src/core/lib/slice/slice_intern.cc +++ b/src/core/lib/slice/slice_intern.cc @@ -172,7 +172,7 @@ int grpc_static_slice_eq(grpc_slice a, grpc_slice b) { uint32_t grpc_slice_hash(grpc_slice s) { return s.refcount == nullptr ? grpc_slice_default_hash_impl(s) - : s.refcount->vtable->hash(s); + : s.refcount->vtable->hash(s); } grpc_slice grpc_slice_maybe_static_intern(grpc_slice slice, diff --git a/src/core/lib/support/avl.cc b/src/core/lib/support/avl.cc index ca0e4c6372..0b67a21f2f 100644 --- a/src/core/lib/support/avl.cc +++ b/src/core/lib/support/avl.cc @@ -60,8 +60,8 @@ static long node_height(gpr_avl_node* node) { #ifndef NDEBUG static long calculate_height(gpr_avl_node* node) { return node == nullptr ? 0 - : 1 + GPR_MAX(calculate_height(node->left), - calculate_height(node->right)); + : 1 + GPR_MAX(calculate_height(node->left), + calculate_height(node->right)); } static gpr_avl_node* assert_invariants(gpr_avl_node* n) { diff --git a/src/core/lib/support/sync_posix.cc b/src/core/lib/support/sync_posix.cc index d306d43cb4..dfdd233bf4 100644 --- a/src/core/lib/support/sync_posix.cc +++ b/src/core/lib/support/sync_posix.cc @@ -33,7 +33,9 @@ gpr_atm gpr_counter_atm_cas = 0; gpr_atm gpr_counter_atm_add = 0; #endif -void gpr_mu_init(gpr_mu* mu) { GPR_ASSERT(pthread_mutex_init(mu, nullptr) == 0); } +void gpr_mu_init(gpr_mu* mu) { + GPR_ASSERT(pthread_mutex_init(mu, nullptr) == 0); +} void gpr_mu_destroy(gpr_mu* mu) { GPR_ASSERT(pthread_mutex_destroy(mu) == 0); } @@ -63,7 +65,9 @@ int gpr_mu_trylock(gpr_mu* mu) { /*----------------------------------------*/ -void gpr_cv_init(gpr_cv* cv) { GPR_ASSERT(pthread_cond_init(cv, nullptr) == 0); } +void gpr_cv_init(gpr_cv* cv) { + GPR_ASSERT(pthread_cond_init(cv, nullptr) == 0); +} void gpr_cv_destroy(gpr_cv* cv) { GPR_ASSERT(pthread_cond_destroy(cv) == 0); } diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 92e36284bd..3a06b0c4cf 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -601,7 +601,8 @@ void grpc_call_unref(grpc_call* c) { // effect of scheduling the previously set cancellation closure, if // any, so that it can release any internal references it may be // holding to the call stack. - grpc_call_combiner_set_notify_on_cancel(&exec_ctx, &c->call_combiner, nullptr); + grpc_call_combiner_set_notify_on_cancel(&exec_ctx, &c->call_combiner, + nullptr); } GRPC_CALL_INTERNAL_UNREF(&exec_ctx, c, "destroy"); grpc_exec_ctx_finish(&exec_ctx); @@ -1910,8 +1911,8 @@ static grpc_call_error call_start_batch(grpc_exec_ctx* exec_ctx, if (!prepare_application_metadata( exec_ctx, call, (int)op->data.send_status_from_server.trailing_metadata_count, - op->data.send_status_from_server.trailing_metadata, 1, 1, nullptr, - 0)) { + op->data.send_status_from_server.trailing_metadata, 1, 1, + nullptr, 0)) { for (int n = 0; n < call->send_extra_metadata_count; n++) { GRPC_MDELEM_UNREF(exec_ctx, call->send_extra_metadata[n].md); } diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc index 8987768a7e..1be734cdb7 100644 --- a/src/core/lib/surface/channel.cc +++ b/src/core/lib/surface/channel.cc @@ -306,8 +306,8 @@ grpc_call* grpc_channel_create_call(grpc_channel* channel, grpc_mdelem_from_slices(&exec_ctx, GRPC_MDSTR_PATH, grpc_slice_ref_internal(method)), host != nullptr ? grpc_mdelem_from_slices(&exec_ctx, GRPC_MDSTR_AUTHORITY, - grpc_slice_ref_internal(*host)) - : GRPC_MDNULL, + grpc_slice_ref_internal(*host)) + : GRPC_MDNULL, grpc_timespec_to_millis_round_up(deadline)); grpc_exec_ctx_finish(&exec_ctx); return call; @@ -323,8 +323,8 @@ grpc_call* grpc_channel_create_pollset_set_call( grpc_mdelem_from_slices(exec_ctx, GRPC_MDSTR_PATH, grpc_slice_ref_internal(method)), host != nullptr ? grpc_mdelem_from_slices(exec_ctx, GRPC_MDSTR_AUTHORITY, - grpc_slice_ref_internal(*host)) - : GRPC_MDNULL, + grpc_slice_ref_internal(*host)) + : GRPC_MDNULL, deadline); } @@ -372,8 +372,8 @@ grpc_call* grpc_channel_create_registered_call( GPR_ASSERT(!reserved); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_call* call = grpc_channel_create_call_internal( - &exec_ctx, channel, parent_call, propagation_mask, completion_queue, nullptr, - GRPC_MDELEM_REF(rc->path), GRPC_MDELEM_REF(rc->authority), + &exec_ctx, channel, parent_call, propagation_mask, completion_queue, + nullptr, GRPC_MDELEM_REF(rc->path), GRPC_MDELEM_REF(rc->authority), grpc_timespec_to_millis_round_up(deadline)); grpc_exec_ctx_finish(&exec_ctx); return call; diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index e90bbfccc2..a171f90666 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -148,7 +148,8 @@ static grpc_error* non_polling_poller_kick( grpc_exec_ctx* exec_ctx, grpc_pollset* pollset, grpc_pollset_worker* specific_worker) { non_polling_poller* p = (non_polling_poller*)pollset; - if (specific_worker == nullptr) specific_worker = (grpc_pollset_worker*)p->root; + if (specific_worker == nullptr) + specific_worker = (grpc_pollset_worker*)p->root; if (specific_worker != nullptr) { non_polling_worker* w = (non_polling_worker*)specific_worker; if (!w->kicked) { @@ -327,7 +328,8 @@ static void cq_destroy_pluck(void* data); static const cq_vtable g_cq_vtable[] = { /* GRPC_CQ_NEXT */ {GRPC_CQ_NEXT, sizeof(cq_next_data), cq_init_next, cq_shutdown_next, - cq_destroy_next, cq_begin_op_for_next, cq_end_op_for_next, cq_next, nullptr}, + cq_destroy_next, cq_begin_op_for_next, cq_end_op_for_next, cq_next, + nullptr}, /* GRPC_CQ_PLUCK */ {GRPC_CQ_PLUCK, sizeof(cq_pluck_data), cq_init_pluck, cq_shutdown_pluck, cq_destroy_pluck, cq_begin_op_for_pluck, cq_end_op_for_pluck, nullptr, diff --git a/src/core/lib/surface/lame_client.cc b/src/core/lib/surface/lame_client.cc index b9e2b58262..7114a9f545 100644 --- a/src/core/lib/surface/lame_client.cc +++ b/src/core/lib/surface/lame_client.cc @@ -167,8 +167,8 @@ grpc_channel* grpc_lame_client_channel_create(const char* target, const char* error_message) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_channel_element* elem; - grpc_channel* channel = grpc_channel_create(&exec_ctx, target, nullptr, - GRPC_CLIENT_LAME_CHANNEL, nullptr); + grpc_channel* channel = grpc_channel_create( + &exec_ctx, target, nullptr, GRPC_CLIENT_LAME_CHANNEL, nullptr); elem = grpc_channel_stack_element(grpc_channel_get_channel_stack(channel), 0); GRPC_API_TRACE( "grpc_lame_client_channel_create(target=%s, error_code=%d, " diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc index bb48c8d900..b816439770 100644 --- a/src/core/lib/surface/server.cc +++ b/src/core/lib/surface/server.cc @@ -1110,8 +1110,8 @@ void grpc_server_setup_transport(grpc_exec_ctx* exec_ctx, grpc_server* s, uint32_t max_probes = 0; grpc_transport_op* op = nullptr; - channel = - grpc_channel_create(exec_ctx, nullptr, args, GRPC_SERVER_CHANNEL, transport); + channel = grpc_channel_create(exec_ctx, nullptr, args, GRPC_SERVER_CHANNEL, + transport); chand = (channel_data*)grpc_channel_stack_element( grpc_channel_get_channel_stack(channel), 0) ->channel_data; diff --git a/src/core/lib/transport/metadata_batch.cc b/src/core/lib/transport/metadata_batch.cc index 480544c8a8..5817765aa3 100644 --- a/src/core/lib/transport/metadata_batch.cc +++ b/src/core/lib/transport/metadata_batch.cc @@ -270,7 +270,8 @@ void grpc_metadata_batch_clear(grpc_exec_ctx* exec_ctx, } bool grpc_metadata_batch_is_empty(grpc_metadata_batch* batch) { - return batch->list.head == nullptr && batch->deadline == GRPC_MILLIS_INF_FUTURE; + return batch->list.head == nullptr && + batch->deadline == GRPC_MILLIS_INF_FUTURE; } size_t grpc_metadata_batch_size(grpc_metadata_batch* batch) { diff --git a/src/core/lib/transport/service_config.cc b/src/core/lib/transport/service_config.cc index 6faf5c272a..adcec8c444 100644 --- a/src/core/lib/transport/service_config.cc +++ b/src/core/lib/transport/service_config.cc @@ -233,8 +233,8 @@ grpc_slice_hash_table* grpc_service_config_create_method_config_table( // Instantiate method config table. grpc_slice_hash_table* method_config_table = nullptr; if (entries != nullptr) { - method_config_table = - grpc_slice_hash_table_create(num_entries, entries, unref_value, nullptr); + method_config_table = grpc_slice_hash_table_create(num_entries, entries, + unref_value, nullptr); gpr_free(entries); } return method_config_table; diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc index 9392c16db3..b39e6ebc30 100644 --- a/src/core/lib/transport/transport.cc +++ b/src/core/lib/transport/transport.cc @@ -186,7 +186,8 @@ void grpc_transport_set_pops(grpc_exec_ctx* exec_ctx, grpc_transport* transport, grpc_pollset_set* pollset_set; if ((pollset = grpc_polling_entity_pollset(pollent)) != nullptr) { transport->vtable->set_pollset(exec_ctx, transport, stream, pollset); - } else if ((pollset_set = grpc_polling_entity_pollset_set(pollent)) != nullptr) { + } else if ((pollset_set = grpc_polling_entity_pollset_set(pollent)) != + nullptr) { transport->vtable->set_pollset_set(exec_ctx, transport, stream, pollset_set); } else { |