Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2003-03-17 20:12:32 +0300
committerJeff Johnston <jjohnstn@redhat.com>2003-03-17 20:12:32 +0300
commit6b3bb52b8465d5ead8eaa77a8829fdb1341cbbce (patch)
treec11d0e669b59f896ed761e805aa5370367c73e48 /newlib/libc/string
parentc745f853be44395ff7a11f944c8ef435bdd234f8 (diff)
2003-03-17 Bob Cassels <bcassels@abinitio.com>
* libc/string/wcschr.c: (wcschr): Look for character first, then for end of string, so you can do wcschr(x, '\0').
Diffstat (limited to 'newlib/libc/string')
-rw-r--r--newlib/libc/string/wcschr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/newlib/libc/string/wcschr.c b/newlib/libc/string/wcschr.c
index fa213c90b..acc07a521 100644
--- a/newlib/libc/string/wcschr.c
+++ b/newlib/libc/string/wcschr.c
@@ -69,14 +69,13 @@ _DEFUN (wcschr, (s, c),
_CONST wchar_t *p;
p = s;
- while (*p)
+ do
{
if (*p == c)
{
/* LINTED interface specification */
return (wchar_t *) p;
}
- p++;
- }
+ } while (*p++);
return NULL;
}