Commit aecb6406 authored by antirez's avatar antirez
Browse files

Fix broken rdbWriteRaw() return value check in rdb.c.

Thanks to @PhoneLi for reporting.
parent 55b6c415
......@@ -99,7 +99,7 @@ int rdbSaveLen(rio *rdb, uint32_t len) {
buf[0] = (REDIS_RDB_32BITLEN<<6);
if (rdbWriteRaw(rdb,buf,1) == -1) return -1;
len = htonl(len);
if (rdbWriteRaw(rdb,&len,4) == -4) return -1;
if (rdbWriteRaw(rdb,&len,4) == -1) return -1;
nwritten = 1+4;
}
return nwritten;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment