summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2018-06-28 15:34:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2018-06-28 15:34:11 +0000
commitc0152f1d3f0e58371c744813b1b4b31364d44131 (patch)
treec3e754a3b692dbab4f132c5dc98af1701396ecef /lib
parent704dc002ff9f2827b3bde90bc820868e1727bbf9 (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')
-rw-r--r--lib/libcurses/tinfo/alloc_entry.c6
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)