Merge pull request #2050 from mattsta/bitops-no-overalloc

Bitops: Stop overallocating storage space on set
This commit is contained in:
Salvatore Sanfilippo
2015-02-25 10:18:07 +01:00
2 changed files with 4 additions and 6 deletions

View File

@ -206,7 +206,7 @@ void setrangeCommand(redisClient *c) {
if (checkStringLength(c,offset+sdslen(value)) != REDIS_OK)
return;
o = createObject(REDIS_STRING,sdsempty());
o = createObject(REDIS_STRING,sdsnewlen(NULL, offset+sdslen(value)));
dbAdd(c->db,c->argv[1],o);
} else {
size_t olen;