diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2019-05-10 12:25:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-10 12:25:18 +0200 |
commit | 433f7638141e1490a7d1165b99dd35d81ca38bf8 (patch) | |
tree | 007c84aea0470749a6894f46eedb9cf48fd32ae2 | |
parent | 402b0d0bd12add7516365f5375717f400d84d1d3 (diff) | |
parent | 842dd85b264f7d77a12273f8b2e7700ce99dd610 (diff) | |
download | redis-433f7638141e1490a7d1165b99dd35d81ca38bf8.tar.gz |
Merge pull request #6083 from tangquanawj/fix-inappropriate-add-operation-code
fix-inappropriate-add-operation-code
-rw-r--r-- | src/ziplist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ziplist.c b/src/ziplist.c index 1579d1109..ef40d6aa2 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -576,7 +576,7 @@ void zipEntry(unsigned char *p, zlentry *e) { /* Create a new empty ziplist. */ unsigned char *ziplistNew(void) { - unsigned int bytes = ZIPLIST_HEADER_SIZE+1; + unsigned int bytes = ZIPLIST_HEADER_SIZE+ZIPLIST_END_SIZE; unsigned char *zl = zmalloc(bytes); ZIPLIST_BYTES(zl) = intrev32ifbe(bytes); ZIPLIST_TAIL_OFFSET(zl) = intrev32ifbe(ZIPLIST_HEADER_SIZE); |