From 1cda411d51fa3904b8c096677bd2afd08d784786 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 30 Jun 1999 16:55:43 +0000 Subject: Update. 1999-06-30 Ulrich Drepper * wcsmbs/wcsrchr.c: Fix handling of L'\0' parameter. * wcsmbs/wcschr.c: Likewise. --- wcsmbs/wcschr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'wcsmbs/wcschr.c') diff --git a/wcsmbs/wcschr.c b/wcsmbs/wcschr.c index 7f5c7dc..a884c0b 100644 --- a/wcsmbs/wcschr.c +++ b/wcsmbs/wcschr.c @@ -1,4 +1,4 @@ -/* 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 @@ -25,11 +25,10 @@ wcschr (wcs, wc) 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; } -- cgit v1.1