aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/security/credentials/credentials.c
diff options
context:
space:
mode:
authorGravatar Yong Ni <yongni@google.com>2017-07-05 14:56:13 -0700
committerGravatar Yong Ni <yongni@google.com>2017-07-05 14:56:13 -0700
commitef698b60cd0dc121f0d8d50f972bbcca6743905f (patch)
treeb103d0b3c6fd128e141b7900f42bb094e52b191f /src/core/lib/security/credentials/credentials.c
parent5f32c517b1f9ac4854039af8d0e1bb2da04f5821 (diff)
parent0c009ba2b590618fdeade42bb7ebd3034f6fd045 (diff)
Merge branch 'master' of github.com:grpc/grpc into matrix
Diffstat (limited to 'src/core/lib/security/credentials/credentials.c')
-rw-r--r--src/core/lib/security/credentials/credentials.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/core/lib/security/credentials/credentials.c b/src/core/lib/security/credentials/credentials.c
index 64a7c3e728..b1f1e82076 100644
--- a/src/core/lib/security/credentials/credentials.c
+++ b/src/core/lib/security/credentials/credentials.c
@@ -159,12 +159,8 @@ static const grpc_arg_pointer_vtable credentials_pointer_vtable = {
grpc_arg grpc_channel_credentials_to_arg(
grpc_channel_credentials *credentials) {
- grpc_arg result;
- result.type = GRPC_ARG_POINTER;
- result.key = GRPC_ARG_CHANNEL_CREDENTIALS;
- result.value.pointer.vtable = &credentials_pointer_vtable;
- result.value.pointer.p = credentials;
- return result;
+ return grpc_channel_arg_pointer_create(
+ GRPC_ARG_CHANNEL_CREDENTIALS, credentials, &credentials_pointer_vtable);
}
grpc_channel_credentials *grpc_channel_credentials_from_arg(
@@ -260,13 +256,8 @@ static const grpc_arg_pointer_vtable cred_ptr_vtable = {
server_credentials_pointer_cmp};
grpc_arg grpc_server_credentials_to_arg(grpc_server_credentials *p) {
- grpc_arg arg;
- memset(&arg, 0, sizeof(grpc_arg));
- arg.type = GRPC_ARG_POINTER;
- arg.key = GRPC_SERVER_CREDENTIALS_ARG;
- arg.value.pointer.p = p;
- arg.value.pointer.vtable = &cred_ptr_vtable;
- return arg;
+ return grpc_channel_arg_pointer_create(GRPC_SERVER_CREDENTIALS_ARG, p,
+ &cred_ptr_vtable);
}
grpc_server_credentials *grpc_server_credentials_from_arg(const grpc_arg *arg) {