We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a24b8e2 + 6f7b510 commit 0b907eaCopy full SHA for 0b907ea
src/plugins/process/tls/src/tls.cpp
@@ -153,9 +153,6 @@ static std::string concatenate_vector_to_hex_string(const std::vector<uint16_t>&
153
static std::string
154
concatenate_extensions_vector_to_string(const std::vector<TLSExtension>& extensions)
155
{
156
- if (extensions.empty()) {
157
- return "";
158
- }
159
auto res = std::accumulate(
160
extensions.begin(),
161
extensions.end(),
@@ -166,7 +163,10 @@ concatenate_extensions_vector_to_string(const std::vector<TLSExtension>& extensi
166
163
}
167
164
return a + std::to_string(extension.type) + "-";
168
165
});
169
- res.pop_back();
+
+ if (!res.empty()) {
+ res.pop_back();
+ }
170
return res;
171
172
0 commit comments