FreeBSD kernel libkern code
memcchr.c File Reference
#include <sys/cdefs.h>
#include <sys/libkern.h>
#include <sys/limits.h>
#include <sys/param.h>
Include dependency graph for memcchr.c:

Go to the source code of this file.

Macros

#define LONGPTR_MASK   (sizeof(long) - 1)
 
#define TESTBYTE
 

Functions

 __FBSDID ("$FreeBSD$")
 
void * memcchr (const void *begin, int c, size_t n)
 

Macro Definition Documentation

◆ LONGPTR_MASK

#define LONGPTR_MASK   (sizeof(long) - 1)

Definition at line 50 of file memcchr.c.

◆ TESTBYTE

#define TESTBYTE
Value:
do { \
if (*p != (unsigned char)c) \
goto done; \
p++; \
} while (0)
STATICMETHOD int done
int c

Definition at line 52 of file memcchr.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ memcchr()

void * memcchr ( const void *  begin,
int  c,
size_t  n 
)

Definition at line 60 of file memcchr.c.

References c, done, and TESTBYTE.