aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/security/oauth2_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/security/oauth2_utils.c')
-rw-r--r--test/core/security/oauth2_utils.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c
index 9b97c38fcb..44a209258d 100644
--- a/test/core/security/oauth2_utils.c
+++ b/test/core/security/oauth2_utils.c
@@ -37,9 +37,9 @@
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
+#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/slice.h>
#include <grpc/support/sync.h>
#include "src/core/lib/security/credentials/credentials.h"
@@ -57,16 +57,16 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data,
const char *error_details) {
oauth2_request *request = user_data;
char *token = NULL;
- gpr_slice token_slice;
+ grpc_slice token_slice;
if (status == GRPC_CREDENTIALS_ERROR) {
gpr_log(GPR_ERROR, "Fetching token failed.");
} else {
GPR_ASSERT(num_md == 1);
token_slice = md_elems[0].value;
- token = gpr_malloc(GPR_SLICE_LENGTH(token_slice) + 1);
- memcpy(token, GPR_SLICE_START_PTR(token_slice),
- GPR_SLICE_LENGTH(token_slice));
- token[GPR_SLICE_LENGTH(token_slice)] = '\0';
+ token = gpr_malloc(GRPC_SLICE_LENGTH(token_slice) + 1);
+ memcpy(token, GRPC_SLICE_START_PTR(token_slice),
+ GRPC_SLICE_LENGTH(token_slice));
+ token[GRPC_SLICE_LENGTH(token_slice)] = '\0';
}
gpr_mu_lock(request->mu);
request->is_done = 1;