Commit 041d8e2a authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Fix up rdbWriteRaw to return number of bytes written

parent 7271198c
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
#include "lzf.h" /* LZF compression library */ #include "lzf.h" /* LZF compression library */
static int rdbWriteRaw(rio *rdb, void *p, size_t len) { static int rdbWriteRaw(rio *rdb, void *p, size_t len) {
if (rioWrite(rdb,p,len) == 0) if (rdb && rioWrite(rdb,p,len) == 0)
return -1; return -1;
return 1; return len;
} }
int rdbSaveType(rio *rdb, unsigned char type) { int rdbSaveType(rio *rdb, unsigned char type) {
......
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