mirror of
https://github.com/fluencelabs/redis
synced 2025-06-18 03:31:21 +00:00
Merge pull request #3828 from oranagra/sdsnewlen_pr
add SDS_NOINIT option to sdsnewlen to avoid unnecessary memsets.
This commit is contained in:
@ -759,7 +759,7 @@ int loadAppendOnlyFile(char *filename) {
|
||||
}
|
||||
if (buf[0] != '$') goto fmterr;
|
||||
len = strtol(buf+1,NULL,10);
|
||||
argsds = sdsnewlen(NULL,len);
|
||||
argsds = sdsnewlen(SDS_NOINIT,len);
|
||||
if (len && fread(argsds,len,1,fp) == 0) {
|
||||
sdsfree(argsds);
|
||||
fakeClient->argc = j; /* Free up to j-1. */
|
||||
|
Reference in New Issue
Block a user