MCPcopy Create free account
hub / github.com/NetSys/bess / decode_hex

Function decode_hex

core/utils/http_parser.cc:469–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467};
468
469static int decode_hex(int ch) {
470 if ('0' <= ch && ch <= '9') {
471 return ch - '0';
472 } else if ('A' <= ch && ch <= 'F') {
473 return ch - 'A' + 0xa;
474 } else if ('a' <= ch && ch <= 'f') {
475 return ch - 'a' + 0xa;
476 } else {
477 return -1;
478 }
479}
480
481ssize_t phr_decode_chunked(struct phr_chunked_decoder *decoder, char *buf,
482 size_t *_bufsz) {

Callers 1

phr_decode_chunkedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected