| 467 | }; |
| 468 | |
| 469 | static 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 | |
| 481 | ssize_t phr_decode_chunked(struct phr_chunked_decoder *decoder, char *buf, |
| 482 | size_t *_bufsz) { |
no outgoing calls
no test coverage detected