From af6dd93510e0d3ce5ed2724e0df4acaa4837266f Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sun, 15 Nov 2015 06:48:56 +0000 Subject: [PATCH] Backport r5355 from trunk. git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_2_4_branch@5416 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 02975bcb..b9302b1f 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-11 Benno Schulenberg * src/files.c (write_file): Avoid calling copy_file() with a null pointer. Found with cppcheck. diff --git a/src/search.c b/src/search.c index 6500bd5e..cbeefccd 100644 --- a/src/search.c +++ b/src/search.c @@ -1129,7 +1129,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