mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
netstat: Fix fallback value for pid field
This commit is contained in:
parent
2cd59df443
commit
589d2d50f5
Notes:
sideshowbarker
2024-07-17 07:38:17 +09:00
Author: https://github.com/fdellwing Commit: https://github.com/SerenityOS/serenity/commit/589d2d50f5 Pull-request: https://github.com/SerenityOS/serenity/pull/18366 Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/trflynn89
1 changed files with 2 additions and 2 deletions
|
@ -231,7 +231,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto state = if_object.get_deprecated_string("state"sv).value_or({});
|
||||
auto origin_uid = if_object.get_i32("origin_uid"sv).value_or(-1);
|
||||
auto origin_pid = (if_object.has("origin_pid"sv)) ? if_object.get_u32("origin_pid"sv).value_or(0) : -1;
|
||||
auto origin_pid = if_object.get_i32("origin_pid"sv).value_or(-1);
|
||||
|
||||
if (!flag_all && ((state == "Listen" && !flag_list) || (state != "Listen" && flag_list)))
|
||||
continue;
|
||||
|
@ -316,7 +316,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
}
|
||||
}
|
||||
|
||||
auto origin_pid = (if_object.has("origin_pid"sv)) ? if_object.get_u32("origin_pid"sv).value_or(0) : -1;
|
||||
auto origin_pid = if_object.get_i32("origin_pid"sv).value_or(-1);
|
||||
auto origin_uid = if_object.get_i32("origin_uid"sv).value_or(-1);
|
||||
|
||||
if (protocol_column != -1)
|
||||
|
|
Loading…
Reference in a new issue