Skip to content

Commit e7d07de

Browse files
fboss2 bgp config: address clang-tidy findings
Drop the redundant .c_str() on the TEnumTraits::findValue() argument in the neighbor enum attribute handler (readability-redundant-string-cstr).
1 parent 7dd1010 commit e7d07de

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fboss/cli/fboss2/commands/config/protocol/bgp/neighbor/CmdConfigProtocolBgpNeighbor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ AttrHandler enumAttr(
233233
mode = static_cast<EnumT>(*enable ? 1 : 0);
234234
valid = true;
235235
} else {
236-
valid = apache::thrift::TEnumTraits<EnumT>::findValue(
237-
values[0].c_str(), &mode);
236+
valid = apache::thrift::TEnumTraits<EnumT>::findValue(values[0], &mode);
238237
}
239238
if (!valid) {
240239
std::string names;

0 commit comments

Comments
 (0)