diff options
Diffstat (limited to 'ncurses/tinfo/lib_ti.c')
| -rw-r--r-- | ncurses/tinfo/lib_ti.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ncurses/tinfo/lib_ti.c b/ncurses/tinfo/lib_ti.c index 5cb77b850dd7..cb73a51502be 100644 --- a/ncurses/tinfo/lib_ti.c +++ b/ncurses/tinfo/lib_ti.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2024,2025 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -37,7 +37,7 @@ #include <tic.h> -MODULE_ID("$Id: lib_ti.c,v 1.34 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_ti.c,v 1.36 2025/11/23 18:58:04 tom Exp $") #if 0 static bool @@ -56,6 +56,7 @@ NCURSES_SP_NAME(tigetflag) (NCURSES_SP_DCLx const char *str) int result = ABSENT_BOOLEAN; T((T_CALLED("tigetflag(%p, %s)"), (void *) SP_PARM, str)); + assert(result < 0); if (HasTInfoTerminal(SP_PARM)) { TERMTYPE2 *tp = &TerminalType(TerminalOf(SP_PARM)); @@ -63,7 +64,7 @@ NCURSES_SP_NAME(tigetflag) (NCURSES_SP_DCLx const char *str) int j = -1; entry_ptr = _nc_find_type_entry(str, BOOLEAN, FALSE); - if (entry_ptr != 0) { + if (entry_ptr != NULL) { j = entry_ptr->nte_index; } #if NCURSES_XNAMES @@ -101,6 +102,7 @@ NCURSES_SP_NAME(tigetnum) (NCURSES_SP_DCLx const char *str) int result = CANCELLED_NUMERIC; /* Solaris returns a -1 on error */ T((T_CALLED("tigetnum(%p, %s)"), (void *) SP_PARM, str)); + assert(result < 0); if (HasTInfoTerminal(SP_PARM)) { TERMTYPE2 *tp = &TerminalType(TerminalOf(SP_PARM)); @@ -108,7 +110,7 @@ NCURSES_SP_NAME(tigetnum) (NCURSES_SP_DCLx const char *str) int j = -1; entry_ptr = _nc_find_type_entry(str, NUMBER, FALSE); - if (entry_ptr != 0) { + if (entry_ptr != NULL) { j = entry_ptr->nte_index; } #if NCURSES_XNAMES @@ -155,7 +157,7 @@ NCURSES_SP_NAME(tigetstr) (NCURSES_SP_DCLx const char *str) int j = -1; entry_ptr = _nc_find_type_entry(str, STRING, FALSE); - if (entry_ptr != 0) { + if (entry_ptr != NULL) { j = entry_ptr->nte_index; } #if NCURSES_XNAMES |
