lsof: Replace copy with reference in a for loop

This commit is contained in:
Linus Groh 2021-05-31 18:03:54 +01:00
commit 1f62aaa193
Notes: sideshowbarker 2024-07-18 17:06:13 +09:00

View file

@ -174,7 +174,7 @@ int main(int argc, char* argv[])
if (open_files.is_empty())
return 0;
for (auto file : open_files) {
for (auto& file : open_files) {
display_entry(file, *processes->find_if([&](auto& entry) { return entry.pid == arg_pid; }));
}
}