diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2018-06-28 15:34:11 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2018-06-28 15:34:11 +0000 |
commit | c0152f1d3f0e58371c744813b1b4b31364d44131 (patch) | |
tree | c3e754a3b692dbab4f132c5dc98af1701396ecef /lib/libcurses/tinfo | |
parent | 704dc002ff9f2827b3bde90bc820868e1727bbf9 (diff) |
Do not cast (signed char) CANCELLED_BOOLEAN to (char) for comparison
against (signed char) variable. Modern "genius" compilers simply
delete the code on unsigned char architectures, amazed they feel
lattitude to convert undefined local behaviour into much larger scope
undefined behaviour (glad to have faster but incorrect libcurses..)
ok millert
Diffstat (limited to 'lib/libcurses/tinfo')
-rw-r--r-- | lib/libcurses/tinfo/alloc_entry.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcurses/tinfo/alloc_entry.c b/lib/libcurses/tinfo/alloc_entry.c index c0861482018..a55be808818 100644 --- a/lib/libcurses/tinfo/alloc_entry.c +++ b/lib/libcurses/tinfo/alloc_entry.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alloc_entry.c,v 1.6 2010/01/12 23:22:06 nicm Exp $ */ +/* $OpenBSD: alloc_entry.c,v 1.7 2018/06/28 15:34:10 deraadt Exp $ */ /**************************************************************************** * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * @@ -50,7 +50,7 @@ #include <tic.h> #include <term_entry.h> -MODULE_ID("$Id: alloc_entry.c,v 1.6 2010/01/12 23:22:06 nicm Exp $") +MODULE_ID("$Id: alloc_entry.c,v 1.7 2018/06/28 15:34:10 deraadt Exp $") #define ABSENT_OFFSET -1 #define CANCELLED_OFFSET -2 @@ -255,7 +255,7 @@ _nc_merge_entry(TERMTYPE *const to, TERMTYPE *const from) _nc_align_termtype(to, from); #endif for_each_boolean(i, from) { - if (to->Booleans[i] != (char) CANCELLED_BOOLEAN) { + if (to->Booleans[i] != CANCELLED_BOOLEAN) { int mergebool = from->Booleans[i]; if (mergebool == CANCELLED_BOOLEAN) |