From 677e9474f74bc7aea3d1c32408698433aac16908 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 13 Aug 2015 17:46:19 +0000 Subject: [PATCH] Removing the mistaken comparison between a pointer and a literal character. (It will always be false, so it is apparently unneeded.) git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5355 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/search.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1bc29bbc..66b55d04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-08-13 Benno Schulenberg + * src/search.c (do_find_bracket): Remove mistaken comparison between + pointer and literal character. Found with cppcheck. + 2015-08-12 Benno Schulenberg * src/chars.c: UTF-8 is a stateless encoding, so there is no need to reset any state. diff --git a/src/search.c b/src/search.c index 085bc33b..843729ff 100644 --- a/src/search.c +++ b/src/search.c @@ -1149,7 +1149,7 @@ void do_find_bracket(void) ch = openfile->current->data + openfile->current_x; - if (ch == '\0' || (ch = mbstrchr(matchbrackets, ch)) == NULL) { + if ((ch = mbstrchr(matchbrackets, ch)) == NULL) { statusbar(_("Not a bracket")); return; } -- 2.39.5