diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2015-02-25 10:18:07 +0100 |
---|---|---|
committer | Salvatore Sanfilippo <antirez@gmail.com> | 2015-02-25 10:18:07 +0100 |
commit | 9454f7b3db48c33cd8bb2d508a6402c4b51cf964 (patch) | |
tree | 06e43330a09162b22f891597e05696b3e2a939e5 /src/t_string.c | |
parent | e00cb78f6712ec2f796f430c7de90e1e64c1ec6d (diff) | |
parent | badf0f008bede268d3235412243fc62d618e323c (diff) | |
download | redis-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.c | 2 |
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; |