Return a pointer to the first element of the listpack, or NULL if the * listpack has no elements. */
| 477 | /* Return a pointer to the first element of the listpack, or NULL if the |
| 478 | * listpack has no elements. */ |
| 479 | unsigned char *lpFirst(unsigned char *lp) { |
| 480 | unsigned char *p = lp + LP_HDR_SIZE; /* Skip the header. */ |
| 481 | if (p[0] == LP_EOF) return NULL; |
| 482 | lpAssertValidEntry(lp, lpBytes(lp), p); |
| 483 | return p; |
| 484 | } |
| 485 | |
| 486 | /* Return a pointer to the last element of the listpack, or NULL if the |
| 487 | * listpack has no elements. */ |
no test coverage detected