[slice_buffer] Fix forward (#29658)

pull/29660/head
Craig Tiller 3 years ago committed by GitHub
parent 409db4dd0f
commit d96edaf63c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/core/event_engine/slice_buffer_test.cc
  2. 2
      test/core/slice/slice_buffer_test.cc

@ -30,7 +30,7 @@ static constexpr int kNewSliceLength = 100;
Slice MakeSlice(size_t len) {
GPR_ASSERT(len > 0);
unsigned char* contents = reinterpret_cast<unsigned char*>(new char[len]);
unsigned char* contents = static_cast<unsigned char*>(gpr_malloc(len));
memset(contents, 'a', len);
return Slice(grpc_slice_new(contents, len, gpr_free));
}

@ -32,7 +32,7 @@ static constexpr int kNewSliceLength = 100;
Slice MakeSlice(size_t len) {
GPR_ASSERT(len > 0);
unsigned char* contents = reinterpret_cast<unsigned char*>(new char[len]);
unsigned char* contents = static_cast<unsigned char*>(gpr_malloc(len));
memset(contents, 'a', len);
return Slice(grpc_slice_new(contents, len, gpr_free));
}

Loading…
Cancel
Save