mirror of
https://github.com/fluencelabs/redis
synced 2025-04-03 08:11:03 +00:00
Fix broken rdbWriteRaw() return value check in rdb.c.
Thanks to @PhoneLi for reporting.
This commit is contained in:
parent
d75ab87226
commit
d3588dc194
@ -99,7 +99,7 @@ int rdbSaveLen(rio *rdb, uint32_t len) {
|
|||||||
buf[0] = (REDIS_RDB_32BITLEN<<6);
|
buf[0] = (REDIS_RDB_32BITLEN<<6);
|
||||||
if (rdbWriteRaw(rdb,buf,1) == -1) return -1;
|
if (rdbWriteRaw(rdb,buf,1) == -1) return -1;
|
||||||
len = htonl(len);
|
len = htonl(len);
|
||||||
if (rdbWriteRaw(rdb,&len,4) == -4) return -1;
|
if (rdbWriteRaw(rdb,&len,4) == -1) return -1;
|
||||||
nwritten = 1+4;
|
nwritten = 1+4;
|
||||||
}
|
}
|
||||||
return nwritten;
|
return nwritten;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user