aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
diff options
context:
space:
mode:
authorGravatar Nathaniel Manista <nathaniel@google.com>2017-11-22 02:10:52 +0000
committerGravatar Nathaniel Manista <nathaniel@google.com>2017-11-22 02:10:52 +0000
commit0eacb45a488beebb94ebab12f2275a477b8f239a (patch)
tree3d11c7956442bf1bab4459cc897cce8b8b88161a /src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
parent77d2c721cbfee17620c3b2c36586cbdb1dfa06d3 (diff)
Elide local field by directly returning values
Diffstat (limited to 'src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi')
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
index 2b8b66cce4..d97c80f17a 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
@@ -274,10 +274,10 @@ def call_credentials_metadata_plugin(CredentialsMetadataPlugin plugin):
return credentials
cdef const char* _get_c_pem_root_certs(pem_root_certs):
- cdef char *c_pem_root_certs = NULL
- if pem_root_certs is not None:
- c_pem_root_certs = pem_root_certs
- return c_pem_root_certs
+ if pem_root_certs is None:
+ return NULL
+ else:
+ return pem_root_certs
cdef grpc_ssl_pem_key_cert_pair* _create_c_ssl_pem_key_cert_pairs(pem_key_cert_pairs):
# return a malloc'ed grpc_ssl_pem_key_cert_pair from a _list_ of SslPemKeyCertPair