| 614 | } |
| 615 | |
| 616 | bool split_tok(const char *buffer, const jsmntok_t *tok, |
| 617 | char split, |
| 618 | jsmntok_t *a, |
| 619 | jsmntok_t *b) |
| 620 | { |
| 621 | const char *p = memchr(buffer + tok->start, split, tok->end - tok->start); |
| 622 | if (!p) |
| 623 | return false; |
| 624 | |
| 625 | *a = *b = *tok; |
| 626 | a->end = p - buffer; |
| 627 | b->start = p + 1 - buffer; |
| 628 | |
| 629 | return true; |
| 630 | } |
| 631 | |
| 632 | bool json_to_secret(const char *buffer, const jsmntok_t *tok, struct secret *dest) |
| 633 | { |
no outgoing calls
no test coverage detected