Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses winwrite - deobfuscate a bit.



details:   https://anonhg.NetBSD.org/src/rev/83044c357606
branches:  trunk
changeset: 449773:83044c357606
user:      uwe <uwe%NetBSD.org@localhost>
date:      Thu Mar 21 21:28:55 2019 +0000

description:
winwrite - deobfuscate a bit.

diffstat:

 lib/libcurses/printw.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r 2f92f5399394 -r 83044c357606 lib/libcurses/printw.c
--- a/lib/libcurses/printw.c    Thu Mar 21 21:13:45 2019 +0000
+++ b/lib/libcurses/printw.c    Thu Mar 21 21:28:55 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: printw.c,v 1.24 2017/01/06 13:53:18 roy Exp $  */
+/*     $NetBSD: printw.c,v 1.25 2019/03/21 21:28:55 uwe Exp $  */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)printw.c   8.3 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: printw.c,v 1.24 2017/01/06 13:53:18 roy Exp $");
+__RCSID("$NetBSD: printw.c,v 1.25 2019/03/21 21:28:55 uwe Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -114,13 +114,13 @@
  * Internal write-buffer-to-window function.
  */
 static ssize_t
-winwrite(void   *cookie, const void *vbuf, size_t n)
+winwrite(void *cookie, const void *vbuf, size_t n)
 {
-       WINDOW *win;
-       size_t     c;
+       WINDOW *win = cookie;
        const char *buf = vbuf;
+       size_t c;
 
-       for (c = 0, win = cookie; c < n; c++) {
+       for (c = 0; c < n; c++) {
 #ifdef DEBUG
                __CTRACE(__CTRACE_MISC, "__winwrite: %c\n", *buf);
 #endif



Home | Main Index | Thread Index | Old Index