Skip to content

Commit

Permalink
Fix a mixed declaration warning in the grpc_rb_call_get_peer_cert method
Browse files Browse the repository at this point in the history
  • Loading branch information
ewr committed Apr 21, 2016
1 parent bdfaf48 commit 336b744
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/ruby/ext/grpc/rb_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 336b744

Please sign in to comment.