From: krw Date: Wed, 3 Aug 2016 16:32:08 +0000 (+0000) Subject: strnames[i][0] == 'k' && strnames[i][0] == 'f' should be X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0ad559dc863ccfbf8db0f77223f41910adf05a83;p=openbsd strnames[i][0] == 'k' && strnames[i][0] == 'f' should be strnames[i][0] == 'k' && strnames[i][1] == 'f'. Spotted by the Echelon team with AppChecker static analyzer. millert@ naddy@ and ncurses 6.0 all agree. --- diff --git a/usr.bin/infocmp/infocmp.c b/usr.bin/infocmp/infocmp.c index cedb8dc7fcf..9caaa8f0858 100644 --- a/usr.bin/infocmp/infocmp.c +++ b/usr.bin/infocmp/infocmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: infocmp.c,v 1.22 2015/11/11 02:52:46 deraadt Exp $ */ +/* $OpenBSD: infocmp.c,v 1.23 2016/08/03 16:32:08 krw Exp $ */ /**************************************************************************** * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * @@ -44,7 +44,7 @@ #include -MODULE_ID("$Id: infocmp.c,v 1.22 2015/11/11 02:52:46 deraadt Exp $") +MODULE_ID("$Id: infocmp.c,v 1.23 2016/08/03 16:32:08 krw Exp $") #define L_CURL "{" #define R_CURL "}" @@ -628,7 +628,7 @@ analyze_string(const char *name, const char *cap, TERMTYPE *tp) char *cp = tp->Strings[i]; /* don't use soft-key capabilities */ - if (strnames[i][0] == 'k' && strnames[i][0] == 'f') + if (strnames[i][0] == 'k' && strnames[i][1] == 'f') continue; if (cp != ABSENT_STRING && cp != CANCELLED_STRING && cp[0] && cp