Source-Changes-HG archive

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

[src/netbsd-2-0]: src/lib/libcurses Pull up revision 1.11 (requested by klein...



details:   https://anonhg.NetBSD.org/src/rev/c469fa9dcb5a
branches:  netbsd-2-0
changeset: 560902:c469fa9dcb5a
user:      tron <tron%NetBSD.org@localhost>
date:      Tue May 11 13:12:49 2004 +0000

description:
Pull up revision 1.11 (requested by kleink in ticket #297):
PR/25397: David A. Holland: bug in second loop of resizeterm
(win used uninitialized), hidden by wrong gcc appeasal.

diffstat:

 lib/libcurses/resize.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r b7605244101a -r c469fa9dcb5a lib/libcurses/resize.c
--- a/lib/libcurses/resize.c    Tue May 11 13:11:18 2004 +0000
+++ b/lib/libcurses/resize.c    Tue May 11 13:12:49 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: resize.c,v 1.10 2004/03/16 07:49:01 jdc Exp $  */
+/*     $NetBSD: resize.c,v 1.10.2.1 2004/05/11 13:12:49 tron Exp $     */
 
 /*
  * Copyright (c) 2001
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)resize.c   blymn 2001/08/26";
 #else
-__RCSID("$NetBSD: resize.c,v 1.10 2004/03/16 07:49:01 jdc Exp $");
+__RCSID("$NetBSD: resize.c,v 1.10.2.1 2004/05/11 13:12:49 tron Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -104,7 +104,7 @@
 int
 resizeterm(int nlines, int ncols)
 {
-       WINDOW *win = NULL;     /* XXX gcc -Wuninitialized */
+       WINDOW *win;
        struct __winlist *list;
        int newlines, newcols;
 
@@ -143,8 +143,10 @@
 
          /* tweak the flags now that we have updated the LINES and COLS */
        for (list = _cursesi_screen->winlistp; list != NULL; list = list->nextp) {
+               win = list->winp;
+
                if (!(win->flags & __ISPAD))
-                       __swflags(list->winp);
+                       __swflags(win);
        }
 
        wrefresh(curscr);



Home | Main Index | Thread Index | Old Index