summaryrefslogtreecommitdiff
path: root/lib/libcurses/tinfo/read_termcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcurses/tinfo/read_termcap.c')
-rw-r--r--lib/libcurses/tinfo/read_termcap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libcurses/tinfo/read_termcap.c b/lib/libcurses/tinfo/read_termcap.c
index a11f04ec350..f48ffcead66 100644
--- a/lib/libcurses/tinfo/read_termcap.c
+++ b/lib/libcurses/tinfo/read_termcap.c
@@ -920,6 +920,7 @@ _nc_read_termcap_entry
#endif
#if USE_GETCAP
char *p, tc[TBUFSIZ];
+ int status;
static char *source;
static int lineno;
@@ -930,8 +931,8 @@ _nc_read_termcap_entry
_nc_set_source("TERMCAP");
} else {
/* we're using getcap(3) */
- if (_nc_tgetent(tc, &source, &lineno, tn) < 0)
- return (ERR);
+ if ((status = _nc_tgetent(tc, &source, &lineno, tn)) < 0)
+ return (status == -1 ? 0 : -1);
_nc_curr_line = lineno;
_nc_set_source(source);