summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authormlelstv <mlelstv@NetBSD.org>2019-02-07 06:10:29 +0000
committermlelstv <mlelstv@NetBSD.org>2019-02-07 06:10:29 +0000
commite134552aaa8feda9f497dc24b027b74b4ebe775d (patch)
treee987891441c49332e3116bb6dab167f27ca115b4 /sys
parentb101e243dfd93d8c08376ba45804d76ad52ebc51 (diff)
be consistent in checking cn_getc return value.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/wscons/wsdisplay.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index 37e905e8f4f..47b92299aef 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay.c,v 1.153 2019/02/03 03:19:28 mrg Exp $ */
+/* $NetBSD: wsdisplay.c,v 1.154 2019/02/07 06:10:29 mlelstv Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.153 2019/02/03 03:19:28 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.154 2019/02/07 06:10:29 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "opt_wsdisplay_compat.h"
@@ -289,9 +289,9 @@ wsscreen_getc_poll(void *priv)
struct tty *tp = scr->scr_tty;
do {
c = wsdisplay_ocn->cn_getc(wsdisplay_ocn->cn_dev);
- if (c != -1)
+ if (c >= 0)
(*tp->t_linesw->l_rint)((unsigned char)c, tp);
- } while (c != -1);
+ } while (c >= 0);
}
callout_schedule(&scr->scr_getc_ch, mstohz(10));