tweaks: reword a comment, and drop an unneeded assert

master
Benno Schulenberg 2019-04-06 20:08:39 +02:00
parent 55952c0984
commit 2f68bbb5e8
1 changed files with 3 additions and 6 deletions

View File

@ -862,17 +862,14 @@ void do_gotolinecolumn_void(void)
} }
#ifndef NANO_TINY #ifndef NANO_TINY
/* Search for a match to one of the two characters in bracket_set. If /* Search, startting from the current position, for any of the two characters
* reverse is TRUE, search backwards for the leftmost bracket. * in bracket_set. If reverse is TRUE, search backwards, otherwise forwards.
* Otherwise, search forwards for the rightmost bracket. Return TRUE if * Return TRUE when a match was found, and FALSE otherwise. */
* we found a match, and FALSE otherwise. */
bool find_bracket_match(bool reverse, const char *bracket_set) bool find_bracket_match(bool reverse, const char *bracket_set)
{ {
linestruct *fileptr = openfile->current; linestruct *fileptr = openfile->current;
const char *rev_start = NULL, *found = NULL; const char *rev_start = NULL, *found = NULL;
assert(mbstrlen(bracket_set) == 2);
/* rev_start might end up 1 character before the start or after the /* rev_start might end up 1 character before the start or after the
* end of the line. This won't be a problem because we'll skip over * end of the line. This won't be a problem because we'll skip over
* it below in that case, and rev_start will be properly set when * it below in that case, and rev_start will be properly set when