| 634 | } |
| 635 | |
| 636 | bool split_tok(const char *buffer, const jsmntok_t *tok, |
| 637 | char split, |
| 638 | jsmntok_t *a, |
| 639 | jsmntok_t *b) |
| 640 | { |
| 641 | const char *p = memchr(buffer + tok->start, split, tok->end - tok->start); |
| 642 | if (!p) |
| 643 | return false; |
| 644 | |
| 645 | *a = *b = *tok; |
| 646 | a->end = p - buffer; |
| 647 | b->start = p + 1 - buffer; |
| 648 | |
| 649 | return true; |
| 650 | } |
| 651 | |
| 652 | bool json_to_secret(const char *buffer, const jsmntok_t *tok, struct secret *dest) |
| 653 | { |
no outgoing calls
no test coverage detected