Skip to content

Commit

Permalink
ProtoContext: remove unnecessary std::to_string() conversions
Browse files Browse the repository at this point in the history
Both iv_proto and tun_mtu_max are simple unsigned integers that
are being inserted into the out ostringstream, so an additional
explicit std::to_string() conversion for them is unnecessary.

Signed-off-by: Razvan Cojocaru <[email protected]>
  • Loading branch information
Razvan Cojocaru authored and Jenkins-dev committed Nov 18, 2024
1 parent 7fcf624 commit 64a47ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openvpn/ssl/proto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1115,8 +1115,8 @@ class ProtoContext : public logging::LoggingMixin<OPENVPN_DEBUG_PROTO,
out << "IV_PLAT=" << platform_name() << '\n';
out << "IV_NCP=2\n"; // negotiable crypto parameters V2
out << "IV_TCPNL=1\n"; // supports TCP non-linear packet ID
out << "IV_PROTO=" << std::to_string(iv_proto) << '\n';
out << "IV_MTU=" << std::to_string(tun_mtu_max) << "\n";
out << "IV_PROTO=" << iv_proto << '\n';
out << "IV_MTU=" << tun_mtu_max << "\n";
/*
* OpenVPN3 allows to be pushed any cipher that it supports as it
* only implements secure ones and BF-CBC for backwards
Expand Down

0 comments on commit 64a47ac

Please sign in to comment.