diff --git a/Userland/Utilities/top.cpp b/Userland/Utilities/top.cpp index ab2fb743630..6c068f743bd 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; }