summaryrefslogtreecommitdiffstats
path: root/usr.bin/infocmp
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2016-08-03 16:32:08 +0000
committerkrw <krw@openbsd.org>2016-08-03 16:32:08 +0000
commit0ad559dc863ccfbf8db0f77223f41910adf05a83 (patch)
treeb2665fb58ec502235760e1df8f6130c748df06da /usr.bin/infocmp
parentA couple of "a->blah == a->blah" -> "a->blah == b->blah". (diff)
downloadwireguard-openbsd-0ad559dc863ccfbf8db0f77223f41910adf05a83.tar.xz
wireguard-openbsd-0ad559dc863ccfbf8db0f77223f41910adf05a83.zip
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.
Diffstat (limited to 'usr.bin/infocmp')
-rw-r--r--usr.bin/infocmp/infocmp.c6
1 files changed, 3 insertions, 3 deletions
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 <dump_entry.h>
-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