Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses quickch - fix inverted checks.



details:   https://anonhg.NetBSD.org/src/rev/9c66a0905df1
branches:  trunk
changeset: 837047:9c66a0905df1
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sun Nov 18 01:05:30 2018 +0000

description:
quickch - fix inverted checks.

I have to admit I have no idea what's going on here, but HAVE_WCHAR
code here inverted the sense of linecmp and cellcmp checks w.r.t the
!HAVE_WCHAR variant just above it.  Cf. also all other similar #ifdefs
in this file.

Found through source code inspection, not really tested.

diffstat:

 lib/libcurses/refresh.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r b07f46af7b19 -r 9c66a0905df1 lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c   Sun Nov 18 00:45:44 2018 +0000
+++ b/lib/libcurses/refresh.c   Sun Nov 18 01:05:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refresh.c,v 1.93 2018/11/18 00:45:44 uwe Exp $ */
+/*     $NetBSD: refresh.c,v 1.94 2018/11/18 01:05:30 uwe Exp $ */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)refresh.c  8.7 (Berkeley) 8/13/94";
 #else
-__RCSID("$NetBSD: refresh.c,v 1.93 2018/11/18 00:45:44 uwe Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.94 2018/11/18 01:05:30 uwe Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -1743,9 +1743,9 @@
                                {
 #else
                                if (clp->hash != blank_hash
-                                   || linecmp(clp->line, clp->line + 1,
+                                   || !linecmp(clp->line, clp->line + 1,
                                    (unsigned int) (__virtscr->maxx - 1))
-                                   || cellcmp(clp->line, buf))
+                                   || !cellcmp(clp->line, buf))
                                {
 #endif /* HAVE_WCHAR */
                                        for (i = __virtscr->maxx;



Home | Main Index | Thread Index | Old Index