Check that the JSON string matches the argument and skip it. */
| 591 | |
| 592 | /* Check that the JSON string matches the argument and skip it. */ |
| 593 | static int skip_string_verbatim(json_string_t *s, const char *str) |
| 594 | { |
| 595 | int c_len; |
| 596 | while (*str) |
| 597 | { |
| 598 | if ((c_len= json_next_char(s)) > 0) |
| 599 | { |
| 600 | if (s->c_next == (my_wc_t) *(str++)) |
| 601 | { |
| 602 | s->c_str+= c_len; |
| 603 | continue; |
| 604 | } |
| 605 | return s->error= JE_SYN; |
| 606 | } |
| 607 | return s->error= json_eos(s) ? JE_EOS : JE_BAD_CHR; |
| 608 | } |
| 609 | |
| 610 | return 0; |
| 611 | } |
| 612 | |
| 613 | |
| 614 | /* Scalar false. */ |
no outgoing calls
no test coverage detected