Skip to content

Commit

Permalink
Memset in channel_filter ctor not needed
Browse files Browse the repository at this point in the history
and causes compiler warnings. Thanks to @KeithMoyer  in grpc#19044 and @soheilhy
  • Loading branch information
vjpai committed May 17, 2019
1 parent ebfed6a commit 570bf33
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/cpp/common/channel_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 570bf33

Please sign in to comment.