mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 06:09:38 +03:00
typo fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4129 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
bebfd9fbb6
commit
36536670c8
@ -1,5 +1,8 @@
|
||||
2007-07-09 David Lawrence Ramsey <pooka109@gmail.com>
|
||||
|
||||
* chars.c (nstrcasestr, mbstrcasestr, revstrstr, revstrcasestr,
|
||||
mbrevstrcasestr): Fix typo that broke the check for needle's
|
||||
being blank.
|
||||
* chars.c (mbstrncasecmp, mbstrnlen, mbstrpbrk,
|
||||
has_blank_mbchars): Simplify by using for loops instead of while
|
||||
loops where possible, to match the single-byte versions of these
|
||||
|
10
src/chars.c
10
src/chars.c
@ -603,7 +603,7 @@ char *nstrcasestr(const char *haystack, const char *needle)
|
||||
{
|
||||
assert(haystack != NULL && needle != NULL);
|
||||
|
||||
if (needle == '\0')
|
||||
if (*needle == '\0')
|
||||
return (char *)haystack;
|
||||
|
||||
for (; *haystack != '\0'; haystack++) {
|
||||
@ -631,7 +631,7 @@ char *mbstrcasestr(const char *haystack, const char *needle)
|
||||
|
||||
assert(haystack != NULL && needle != NULL);
|
||||
|
||||
if (needle == '\0')
|
||||
if (*needle == '\0')
|
||||
return (char *)haystack;
|
||||
|
||||
r_mb = charalloc(MB_CUR_MAX);
|
||||
@ -693,7 +693,7 @@ char *revstrstr(const char *haystack, const char *needle, const char
|
||||
{
|
||||
assert(haystack != NULL && needle != NULL && rev_start != NULL);
|
||||
|
||||
if (needle == '\0')
|
||||
if (*needle == '\0')
|
||||
return (char *)rev_start;
|
||||
|
||||
for (; rev_start >= haystack; rev_start--) {
|
||||
@ -718,7 +718,7 @@ char *revstrcasestr(const char *haystack, const char *needle, const char
|
||||
{
|
||||
assert(haystack != NULL && needle != NULL && rev_start != NULL);
|
||||
|
||||
if (needle == '\0')
|
||||
if (*needle == '\0')
|
||||
return (char *)rev_start;
|
||||
|
||||
for (; rev_start >= haystack; rev_start--) {
|
||||
@ -748,7 +748,7 @@ char *mbrevstrcasestr(const char *haystack, const char *needle, const
|
||||
|
||||
assert(haystack != NULL && needle != NULL && rev_start != NULL);
|
||||
|
||||
if (needle == '\0')
|
||||
if (*needle == '\0')
|
||||
return (char *)rev_start;
|
||||
|
||||
r_mb = charalloc(MB_CUR_MAX);
|
||||
|
Loading…
Reference in New Issue
Block a user