Back to index

cell-binutils  2.17cvs20070401
memchr.c File Reference
#include <ansidecl.h>
#include <stddef.h>

Go to the source code of this file.


PTR memchr (register const PTR src_void, int c, size_t length)

Function Documentation

PTR memchr ( register const PTR  src_void,
int  c,
size_t  length 

Definition at line 21 of file memchr.c.

  const unsigned char *src = (const unsigned char *)src_void;
  while (length-- > 0)
    if (*src == c)
     return (PTR)src;
  return NULL;

Here is the caller graph for this function: