summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-29 23:08:32 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-30 23:34:40 +0100
commitfd2ea6923cfff271b14c3750dba7046233de65ca (patch)
tree8b2b2eca1efb3321503c6e8c81c7a17b1635033d /Userland
parent90aa1abfed5c575f6a60e9f2ac0a0d912c82277d (diff)
downloadserenity-fd2ea6923cfff271b14c3750dba7046233de65ca.zip
top: Use Core::System::ioctl()
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Utilities/top.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Userland/Utilities/top.cpp b/Userland/Utilities/top.cpp
index ab2fb74363..6c068f743b 100644
--- a/Userland/Utilities/top.cpp
+++ b/Userland/Utilities/top.cpp
@@ -197,11 +197,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
usleep(10000);
for (;;) {
if (g_window_size_changed) {
- int rc = ioctl(STDOUT_FILENO, TIOCGWINSZ, &g_window_size);
- if (rc < 0) {
- perror("ioctl(TIOCGWINSZ)");
- return 1;
- }
+ TRY(Core::System::ioctl(STDOUT_FILENO, TIOCGWINSZ, &g_window_size));
g_window_size_changed = false;
}