MCPcopy Create free account
hub / github.com/coreboot/coreboot / _offset

Function _offset

payloads/libpayload/libc/string.c:340–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338/* Return the "value" of the character in the given base */
339
340static int _offset(char ch, int base)
341{
342 if (ch >= '0' && ch <= '9')
343 return ch - '0';
344 else
345 return 10 + tolower(ch) - 'a';
346}
347
348/**
349 * Convert the initial portion of a string into a signed int

Callers 1

strtoullFunction · 0.85

Calls 1

tolowerFunction · 0.70

Tested by

no test coverage detected