mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-21 04:31:04 +08:00
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.c (memchr): loop searching for matching character bailed out one too early; changed constant 6 to 7 to fix this.
This commit is contained in:
parent
da184b1bcf
commit
3964340a69
@ -72,7 +72,7 @@ memchr (const void *s, int c, size_t n)
|
|||||||
unsigned char *cp = (unsigned char *) (longword_ptr - 1);
|
unsigned char *cp = (unsigned char *) (longword_ptr - 1);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 7; i++)
|
||||||
if (cp[i] == c)
|
if (cp[i] == c)
|
||||||
return &cp[i];
|
return &cp[i];
|
||||||
return &cp[7];
|
return &cp[7];
|
||||||
|
Loading…
Reference in New Issue
Block a user