coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memchr.c
Go to the documentation of this file.
1
#include <
string.h
>
2
void
*
memchr
(
const
void
*
s
,
int
c
,
size_t
n)
3
{
4
const
unsigned
char
*sc =
s
;
5
while
(n--) {
6
if
(*sc == (
unsigned
char
)
c
)
7
return
(
void
*)sc;
8
sc++;
9
}
10
return
NULL
;
11
}
memchr
void * memchr(const void *s, int c, size_t n)
Definition:
memchr.c:2
NULL
#define NULL
Definition:
stddef.h:19
string.h
s
#define s(param, src_bits, pmcreg, dst_bits)
c
#define c(value, pmcreg, dst_bits)
src
lib
memchr.c
Generated by
1.9.1