tweaks: rename two variables, away from a single letter

And adjust the indentation after the previous change.
This commit is contained in:
Benno Schulenberg 2019-06-09 11:08:34 +02:00
parent 7be76af418
commit 71236e145d
1 changed files with 11 additions and 11 deletions

View File

@ -504,22 +504,22 @@ char *mbrevstrcasestr(const char *haystack, const char *needle,
}
/* Count the number of (multibyte) characters in the given string. */
size_t mbstrlen(const char *s)
size_t mbstrlen(const char *pointer)
{
size_t n = 0;
size_t count = 0;
while (*s != '\0') {
if ((signed char)*s < 0) {
int length = mblen(s, MAXCHARLEN);
while (*pointer != '\0') {
if ((signed char)*pointer < 0) {
int length = mblen(pointer, MAXCHARLEN);
s += (length < 0 ? 1 : length);
} else
s++;
pointer += (length < 0 ? 1 : length);
} else
pointer++;
n++;
}
count++;
}
return n;
return count;
}
#if !defined(NANO_TINY) || defined(ENABLE_JUSTIFY)