repo.or.cz
/
coreboot.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
soc/intel/alderlake: Add ADL-P 4+4 with 28W TDP
[coreboot.git]
/
src
/
lib
/
memchr.c
blob
65440324afff0126cae8828f1d6c54939a37c8b9
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <string.h>
4
void
*
memchr
(
const void
*
s
,
int
c
,
size_t
n
)
5
{
6
const unsigned char
*
sc
=
s
;
7
while
(
n
--) {
8
if
(*
sc
== (
unsigned char
)
c
)
9
return
(
void
*)
sc
;
10
sc
++;
11
}
12
return
NULL
;
13
}