From fd2ea6923cfff271b14c3750dba7046233de65ca Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 29 Nov 2021 23:08:32 +0100 Subject: [PATCH] top: Use Core::System::ioctl() --- Userland/Utilities/top.cpp | 6 +----- 1 file changed, 1 insertion(+), 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 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; }