diff options
author | asou <asou@cvs.openbsd.org> | 2019-08-14 08:31:01 +0000 |
---|---|---|
committer | asou <asou@cvs.openbsd.org> | 2019-08-14 08:31:01 +0000 |
commit | eda7dbe7305cc0538c50b56e513c9f2a463fefc4 (patch) | |
tree | 3788b6c4cd146565631132bfbf9d3da7178f74eb /lib | |
parent | 35c039e386afcb85272e0bc991822d6f56dfb615 (diff) |
read() returns -1 on failure
ok yasuoka@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libedit/readline.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libedit/readline.c b/lib/libedit/readline.c index 54a9dc553ad..3fa6593f678 100644 --- a/lib/libedit/readline.c +++ b/lib/libedit/readline.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readline.c,v 1.28 2019/06/28 13:32:42 deraadt Exp $ */ +/* $OpenBSD: readline.c,v 1.29 2019/08/14 08:31:00 asou Exp $ */ /* $NetBSD: readline.c,v 1.91 2010/08/28 15:44:59 christos Exp $ */ /*- @@ -2112,7 +2112,7 @@ _rl_event_read_char(EditLine *el, wchar_t *wc) return -1; #endif - if (num_read < 0 && errno == EAGAIN) + if (num_read == -1 && errno == EAGAIN) continue; if (num_read == 0) continue; |