Skip to content

Commit

Permalink
fix(libsinsp): use size_type
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Guerra <[email protected]>
  • Loading branch information
LucaGuerra authored and poiana committed Jul 4, 2024
1 parent 0ec2ad8 commit 3eae0fa
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 3eae0fa

Please sign in to comment.