Memset in channel_filter ctor not needed

and causes compiler warnings. Thanks to @KeithMoyer  in #19044 and @soheilhy
pull/19068/head
Vijay Pai 6 years ago committed by GitHub
parent ebfed6ad7b
commit 570bf332bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/cpp/common/channel_filter.cc

@ -30,7 +30,6 @@ namespace grpc {
grpc_linked_mdelem* MetadataBatch::AddMetadata(const string& key,
const string& value) {
grpc_linked_mdelem* storage = new grpc_linked_mdelem;
memset(storage, 0, sizeof(grpc_linked_mdelem));
storage->md = grpc_mdelem_from_slices(SliceFromCopiedString(key),
SliceFromCopiedString(value));
GRPC_LOG_IF_ERROR("MetadataBatch::AddMetadata",

Loading…
Cancel
Save