Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Drop a few redundant casts of a variable to it...



details:   https://anonhg.NetBSD.org/src/rev/90401951be94
branches:  trunk
changeset: 446088:90401951be94
user:      uwe <uwe%NetBSD.org@localhost>
date:      Thu Nov 22 23:37:31 2018 +0000

description:
Drop a few redundant casts of a variable to its own type.

diffstat:

 lib/libcurses/attributes.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 4cfbbe54a4e0 -r 90401951be94 lib/libcurses/attributes.c
--- a/lib/libcurses/attributes.c        Thu Nov 22 23:29:09 2018 +0000
+++ b/lib/libcurses/attributes.c        Thu Nov 22 23:37:31 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: attributes.c,v 1.25 2018/11/22 23:29:09 uwe Exp $      */
+/*     $NetBSD: attributes.c,v 1.26 2018/11/22 23:37:31 uwe Exp $      */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: attributes.c,v 1.25 2018/11/22 23:29:09 uwe Exp $");
+__RCSID("$NetBSD: attributes.c,v 1.26 2018/11/22 23:37:31 uwe Exp $");
 #endif                         /* not lint */
 
 #include "curses.h"
@@ -199,8 +199,8 @@
        if (attr & __UNDERSCORE && t_enter_underline_mode(t) != NULL &&
            t_exit_underline_mode(t) != NULL)
                wunderscore(win);
-       if ((attr_t) attr & __COLOR)
-               __wcolor_set(win, (attr_t) attr);
+       if (attr & __COLOR)
+               __wcolor_set(win, attr);
        return OK;
 }
 
@@ -253,7 +253,7 @@
                wstandend(win);
        if (attr & __UNDERSCORE)
                wunderend(win);
-       if ((attr_t) attr & __COLOR) {
+       if (attr & __COLOR) {
                if (max_colors != 0)
                        win->wattr &= ~__COLOR;
        }



Home | Main Index | Thread Index | Old Index