fetch_next_token returns the substring from str+1 * to the next occurrence of char term, or \0, whichever * occurs first. Leading whitespace is ignored. */
| 640 | * occurs first. Leading whitespace is ignored. |
| 641 | */ |
| 642 | static char *dav_fetch_next_token(char **str, char term) |
| 643 | { |
| 644 | char *sp; |
| 645 | char *token; |
| 646 | |
| 647 | token = *str + 1; |
| 648 | |
| 649 | while (*token && (*token == ' ' || *token == '\t')) |
| 650 | token++; |
| 651 | |
| 652 | if ((sp = strchr(token, term)) == NULL) |
| 653 | return NULL; |
| 654 | |
| 655 | *sp = '\0'; |
| 656 | *str = sp; |
| 657 | return token; |
| 658 | } |
| 659 | |
| 660 | /* dav_process_if_header: |
| 661 | * |
no outgoing calls
no test coverage detected