]> git.wh0rd.org Git - nano.git/commitdiff
Backport r5355 from trunk.
authorChris Allegretta <chrisa@asty.org>
Sun, 15 Nov 2015 06:48:56 +0000 (06:48 +0000)
committerChris Allegretta <chrisa@asty.org>
Sun, 15 Nov 2015 06:48:56 +0000 (06:48 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_2_4_branch@5416 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/search.c

index 02975bcba288865cd649084a37b4b5b0578aae7b..b9302b1f22a6625f95119dbde914462bb6f1bfde 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-08-13  Benno Schulenberg  <bensberg@justemail.net>
+       * src/search.c (do_find_bracket): Remove mistaken comparison between
+       pointer and literal character.  Found with cppcheck.
+
 2015-08-11  Benno Schulenberg  <bensberg@justemail.net>
        * src/files.c (write_file): Avoid calling copy_file() with a null
        pointer.  Found with cppcheck.
index 6500bd5e0bccbe4cf434fdf3cb7ad0c5c97589e6..cbeefccdf78ee436feb2798502229f838dc123a1 100644 (file)
@@ -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;
     }