summaryrefslogtreecommitdiff
path: root/src/t_string.c
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2015-02-25 10:18:07 +0100
committerSalvatore Sanfilippo <antirez@gmail.com>2015-02-25 10:18:07 +0100
commit9454f7b3db48c33cd8bb2d508a6402c4b51cf964 (patch)
tree06e43330a09162b22f891597e05696b3e2a939e5 /src/t_string.c
parente00cb78f6712ec2f796f430c7de90e1e64c1ec6d (diff)
parentbadf0f008bede268d3235412243fc62d618e323c (diff)
downloadredis-9454f7b3db48c33cd8bb2d508a6402c4b51cf964.tar.gz
Merge pull request #2050 from mattsta/bitops-no-overalloc
Bitops: Stop overallocating storage space on set
Diffstat (limited to 'src/t_string.c')
-rw-r--r--src/t_string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/t_string.c b/src/t_string.c
index 53da875cb..06c2e9ceb 100644
--- a/src/t_string.c
+++ b/src/t_string.c
@@ -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;