mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-29 19:10:26 +00:00
lsof: Use more StringView instead of const char*
This commit is contained in:
parent
262161481f
commit
46c4988568
Notes:
sideshowbarker
2024-07-17 19:57:18 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/SerenityOS/serenity/commit/46c4988568d Pull-request: https://github.com/SerenityOS/serenity/pull/12221
1 changed files with 4 additions and 4 deletions
|
@ -110,11 +110,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
bool arg_all_processes { false };
|
||||
int arg_fd { -1 };
|
||||
const char* arg_uid { nullptr };
|
||||
StringView arg_uid;
|
||||
int arg_uid_int = -1;
|
||||
int arg_pgid { -1 };
|
||||
pid_t arg_pid { -1 };
|
||||
const char* arg_filename { nullptr };
|
||||
StringView arg_filename;
|
||||
|
||||
if (arguments.strings.size() == 1)
|
||||
arg_all_processes = true;
|
||||
|
@ -152,9 +152,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
if ((arg_all_processes)
|
||||
|| (arg_fd != -1 && file.fd == arg_fd)
|
||||
|| (arg_uid_int != -1 && (int)process.uid == arg_uid_int)
|
||||
|| (arg_uid != nullptr && process.username == arg_uid)
|
||||
|| (!arg_uid.is_empty() && process.username == arg_uid)
|
||||
|| (arg_pgid != -1 && (int)process.pgid == arg_pgid)
|
||||
|| (arg_filename != nullptr && file.name == arg_filename))
|
||||
|| (!arg_filename.is_empty() && file.name == arg_filename))
|
||||
display_entry(file, process);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue