Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(libsinsp): use size_type in basename transformer #1945

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions userspace/libsinsp/sinsp_filter_transformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ bool sinsp_filter_transformer::transform_values(std::vector<extract_value_t>& ve
{
return string_transformer(vec, t, [](std::string_view in, storage_t& out) -> bool {
auto last_slash_pos = in.find_last_of("/");
ssize_t start_idx = last_slash_pos == std::string_view::npos ? 0 : last_slash_pos + 1;
std::string_view::size_type start_idx = last_slash_pos == std::string_view::npos ? 0 : last_slash_pos + 1;

for (ssize_t i = start_idx; i < in.length(); i++)
for (std::string_view::size_type i = start_idx; i < in.length(); i++)
{
out.push_back(in[i]);
}
Expand Down
Loading