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:
Roland McGrath 1996-02-15 16:47:45 +00:00
parent da184b1bcf
commit 3964340a69

View File

@ -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];