mirror of
https://github.com/fluencelabs/redis
synced 2025-03-31 14:51:04 +00:00
Fixed sds.c bug #124
This commit is contained in:
parent
b055378971
commit
b2b5ae8006
1
TODO
1
TODO
@ -75,6 +75,7 @@ it's not a guarantee they'll ever get implemented ;)
|
|||||||
* Pattern-matching replication.
|
* Pattern-matching replication.
|
||||||
* Don't save empty lists / sets / zsets on disk with snapshotting.
|
* Don't save empty lists / sets / zsets on disk with snapshotting.
|
||||||
* Remove keys when a list / set / zset reaches length of 0.
|
* Remove keys when a list / set / zset reaches length of 0.
|
||||||
|
* Add an option to relax the delete-expiring-keys-on-write semantic *denying* replication and AOF when this is on? Can be handy sometimes, when using Redis for non persistent state.
|
||||||
|
|
||||||
DOCUMENTATION WISHLIST
|
DOCUMENTATION WISHLIST
|
||||||
======================
|
======================
|
||||||
|
2
sds.c
2
sds.c
@ -140,7 +140,7 @@ sds sdscpylen(sds s, char *t, size_t len) {
|
|||||||
size_t totlen = sh->free+sh->len;
|
size_t totlen = sh->free+sh->len;
|
||||||
|
|
||||||
if (totlen < len) {
|
if (totlen < len) {
|
||||||
s = sdsMakeRoomFor(s,len-totlen);
|
s = sdsMakeRoomFor(s,len-sh->len);
|
||||||
if (s == NULL) return NULL;
|
if (s == NULL) return NULL;
|
||||||
sh = (void*) (s-(sizeof(struct sdshdr)));
|
sh = (void*) (s-(sizeof(struct sdshdr)));
|
||||||
totlen = sh->free+sh->len;
|
totlen = sh->free+sh->len;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user