From 336b744eff21c447fe783ae7bab491980c6d93d2 Mon Sep 17 00:00:00 2001 From: Eric Richardson Date: Thu, 21 Apr 2016 14:46:59 -0400 Subject: Fix a mixed declaration warning in the grpc_rb_call_get_peer_cert method --- src/ruby/ext/grpc/rb_call.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/ruby/ext') diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index c8be2773fd..48c49a21e9 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -227,14 +227,16 @@ static VALUE grpc_rb_call_get_peer_cert(VALUE self) { return Qnil; } - grpc_auth_property_iterator it = - grpc_auth_context_find_properties_by_name(ctx, GRPC_X509_PEM_CERT_PROPERTY_NAME); - const grpc_auth_property *prop = grpc_auth_property_iterator_next(&it); - if (prop == NULL) { - return Qnil; - } + { + grpc_auth_property_iterator it = + grpc_auth_context_find_properties_by_name(ctx, GRPC_X509_PEM_CERT_PROPERTY_NAME); + const grpc_auth_property *prop = grpc_auth_property_iterator_next(&it); + if (prop == NULL) { + return Qnil; + } - res = rb_str_new2(prop->value); + res = rb_str_new2(prop->value); + } grpc_auth_context_release(ctx); -- cgit v1.2.3