rawmemchr.c 437 B

12345678910111213141516171819
  1. /*
  2. * Copyright (C) 2002 Manuel Novoa III
  3. * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. *
  5. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. */
  7. #include "_string.h"
  8. void attribute_hidden *__rawmemchr(const void *s, int c)
  9. {
  10. register const unsigned char *r = s;
  11. while (*r != ((unsigned char)c)) ++r;
  12. return (void *) r; /* silence the warning */
  13. }
  14. strong_alias(__rawmemchr,rawmemchr)