Sets a pointer to the first argument and its length starting at p. Returns * the number of bytes to skip to get to the following argument. */
| 718 | /* Sets a pointer to the first argument and its length starting at p. Returns |
| 719 | * the number of bytes to skip to get to the following argument. */ |
| 720 | static const char *nextArgument(const char *start, const char **str, size_t *len) { |
| 721 | const char *p = start; |
| 722 | if (p[0] != '$') { |
| 723 | p = strchr(p,'$'); |
| 724 | if (p == NULL) return NULL; |
| 725 | } |
| 726 | |
| 727 | *len = (int)strtol(p+1,NULL,10); |
| 728 | p = strchr(p,'\r'); |
| 729 | assert(p); |
| 730 | *str = p+2; |
| 731 | return p+2+(*len)+2; |
| 732 | } |
| 733 | |
| 734 | /* Helper function for the redisAsyncCommand* family of functions. Writes a |
| 735 | * formatted command to the output buffer and registers the provided callback |
no outgoing calls
no test coverage detected