From fc4fb9fb92948da164b91cf1a05b6106921c1335 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 24 Jun 2022 12:45:11 +0100 Subject: [PATCH] weston-terminal: Make exit path a little more obvious Signed-off-by: Daniel Stone --- clients/terminal.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/clients/terminal.c b/clients/terminal.c index b02d7d03..4f873f8a 100644 --- a/clients/terminal.c +++ b/clients/terminal.c @@ -3054,10 +3054,12 @@ io_handler(struct task *task, uint32_t events) } len = read(terminal->master, buffer, sizeof buffer); - if (len < 0) + if (len < 0) { terminal_destroy(terminal); - else - terminal_data(terminal, buffer, len); + return; + } + + terminal_data(terminal, buffer, len); } static int