+1999-06-30 Ulrich Drepper <drepper@cygnus.com>
+
+ * wcsmbs/wcsrchr.c: Fix handling of L'\0' parameter.
+ * wcsmbs/wcschr.c: Likewise.
+
1999-06-28 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/e_gamma_r.c: Initialize *signgamp for NaN
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
register const wchar_t *wcs;
register const wchar_t wc;
{
- while (*wcs != L'\0')
+ do
if (*wcs == wc)
return (wchar_t *) wcs;
- else
- ++wcs;
+ while (*wcs++ != L'\0')
return NULL;
}
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>
{
const wchar_t *retval = NULL;
- while (*wcs != L'\0')
- {
- if (*wcs == wc)
- retval = wcs;
- ++wcs;
- }
+ do
+ if (*wcs == wc)
+ retval = wcs;
+ while (*wcs++ != L'\0')
return (wchar_t *) retval;
}