Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/wscons be consistent in checking cn_getc return value.



details:   https://anonhg.NetBSD.org/src/rev/29a0491736a2
branches:  trunk
changeset: 448693:29a0491736a2
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Thu Feb 07 06:10:29 2019 +0000

description:
be consistent in checking cn_getc return value.

diffstat:

 sys/dev/wscons/wsdisplay.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 559082764991 -r 29a0491736a2 sys/dev/wscons/wsdisplay.c
--- a/sys/dev/wscons/wsdisplay.c        Thu Feb 07 06:01:04 2019 +0000
+++ b/sys/dev/wscons/wsdisplay.c        Thu Feb 07 06:10:29 2019 +0000
@@ -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 @@
                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));



Home | Main Index | Thread Index | Old Index