For the architectures which don't have it, let's have a na\"\ive one in C.
Since it's debug code, who cares, right?
void *memchr(const void *s, int c, size_t n)
{
while (n-- != 0) {
if (c == (char *)s++) {
return s-1;
}
}
return NULL;
}
-- Matthew Wilcox <willy@bofh.ai> "Windows and MacOS are products, contrived by engineers in the service of specific companies. Unix, by contrast, is not so much a product as it is a painstakingly compiled oral history of the hacker subculture." - N Stephenson- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/