aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-03 11:14:09 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-03 11:14:09 +0000
commite76357eabb9f371a7350c8f34253bd631ac4b266 (patch)
treebed3612225c01a70af56c14480867f6a3a60c133 /terminal.c
parentterminal: comments and cleanup (diff)
terminal: ptmx fdm handler: tag unlikely branches
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/terminal.c b/terminal.c
index 8fabe81f..8d5e195f 100644
--- a/terminal.c
+++ b/terminal.c
@@ -122,15 +122,15 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
{
struct terminal *term = data;
- if (events & EPOLLOUT) {
+ if (unlikely(events & EPOLLOUT)) {
if (!fdm_ptmx_out(fdm, fd, events, data))
return false;
}
- if ((events & EPOLLHUP) && !(events & EPOLLIN))
+ if (unlikely((events & EPOLLHUP) && !(events & EPOLLIN)))
return term_shutdown(term);
- if (!(events & EPOLLIN))
+ if (unlikely(!(events & EPOLLIN)))
return true;
uint8_t buf[24 * 1024];