summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorasou <asou@cvs.openbsd.org>2019-08-14 08:31:01 +0000
committerasou <asou@cvs.openbsd.org>2019-08-14 08:31:01 +0000
commiteda7dbe7305cc0538c50b56e513c9f2a463fefc4 (patch)
tree3788b6c4cd146565631132bfbf9d3da7178f74eb /lib
parent35c039e386afcb85272e0bc991822d6f56dfb615 (diff)
read() returns -1 on failure
ok yasuoka@
Diffstat (limited to 'lib')
-rw-r--r--lib/libedit/readline.c4
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;