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
mb/system76/cml-u/dt: Make use of chipset devicetree
[coreboot.git]
/
src
/
commonlib
/
bsd
/
string.c
blob
3286d41b1cfa88a269e27fe5219b312a9bc37b38
1
/* SPDX-License-Identifier: BSD-3-Clause */
2
3
#include <commonlib/bsd/string.h>
4
#include <ctype.h>
5
6
unsigned int
skip_atoi
(
char
**
ptr
)
7
{
8
unsigned int
result
=
0
;
9
char
*
str
;
10
11
for
(
str
= *
ptr
;
isdigit
(
str
[
0
]);
str
++)
12
result
=
result
*
10
+ (
str
[
0
] -
'0'
);
13
*
ptr
=
str
;
14
return
result
;
15
}