]> git.wh0rd.org Git - nano.git/commitdiff
Removing the mistaken comparison between a pointer and a literal character.
authorBenno Schulenberg <bensberg@justemail.net>
Thu, 13 Aug 2015 17:46:19 +0000 (17:46 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Thu, 13 Aug 2015 17:46:19 +0000 (17:46 +0000)
(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
src/search.c

index 1bc29bbc676cbde0920192517f14b0b90667c1a1..66b55d0448a0a5ba87bc96c68dbeef07bd9ec061 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-12  Benno Schulenberg  <bensberg@justemail.net>
        * src/chars.c: UTF-8 is a stateless encoding, so there is no need to
        reset any state.
index 085bc33b01f2fce2e578b1c1e70ca984b40226e6..843729ff47655b426fc3f1bff7579da66499097d 100644 (file)
@@ -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;
     }