Move to next entry based on the values in eptr and sptr. Both are set to * NULL when there is no next entry. */
| 789 | /* Move to next entry based on the values in eptr and sptr. Both are set to |
| 790 | * NULL when there is no next entry. */ |
| 791 | void zzlNext(unsigned char *zl, unsigned char **eptr, unsigned char **sptr) { |
| 792 | unsigned char *_eptr, *_sptr; |
| 793 | serverAssert(*eptr != NULL && *sptr != NULL); |
| 794 | |
| 795 | _eptr = ziplistNext(zl,*sptr); |
| 796 | if (_eptr != NULL) { |
| 797 | _sptr = ziplistNext(zl,_eptr); |
| 798 | serverAssert(_sptr != NULL); |
| 799 | } else { |
| 800 | /* No next entry. */ |
| 801 | _sptr = NULL; |
| 802 | } |
| 803 | |
| 804 | *eptr = _eptr; |
| 805 | *sptr = _sptr; |
| 806 | } |
| 807 | |
| 808 | /* Move to the previous entry based on the values in eptr and sptr. Both are |
| 809 | * set to NULL when there is no next entry. */ |
no test coverage detected