| 271 | * zlbytes*/ |
| 272 | #define ZIPLIST_MAX_SAFETY_SIZE (1<<30) |
| 273 | int ziplistSafeToAdd(unsigned char* zl, size_t add) { |
| 274 | size_t len = zl? ziplistBlobLen(zl): 0; |
| 275 | if (len + add > ZIPLIST_MAX_SAFETY_SIZE) |
| 276 | return 0; |
| 277 | return 1; |
| 278 | } |
| 279 | |
| 280 | |
| 281 | /* We use this function to receive information about a ziplist entry. |
no test coverage detected