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
cpu/samsung/exynos5250: Move update-bl1.sh to 3rdparty/blobs/
[coreboot.git]
/
src
/
lib
/
memchr.c
blob
a890dceada9cae8efa4304ef0a5b8e1fad94cad5
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
}