projects
/
redis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
221782c
)
More rioRead()
author
Pieter Noordhuis
<pcnoordhuis@gmail.com>
Sat, 14 May 2011 10:15:08 +0000
(12:15 +0200)
committer
Pieter Noordhuis
<pcnoordhuis@gmail.com>
Sat, 14 May 2011 10:32:50 +0000
(12:32 +0200)
src/rdb.c
patch
|
blob
|
blame
|
history
diff --git
a/src/rdb.c
b/src/rdb.c
index ee992809e9d92f2dba6680a41b834f4cd0ca24b2..d9c819406191dfbf6d57dde5fa4174e6b3db146f 100644
(file)
--- a/
src/rdb.c
+++ b/
src/rdb.c
@@
-956,7
+956,8
@@
int rdbLoad(char *filename) {
fp = fopen(filename,"r");
if (!fp) return REDIS_ERR;
- if (fread(buf,9,1,fp) == 0) goto eoferr;
+ rdb = rioInitWithFile(fp);
+ if (rioRead(&rdb,buf,9) == 0) goto eoferr;
buf[9] = '\0';
if (memcmp(buf,"REDIS",5) != 0) {
fclose(fp);
@@
-971,7
+972,6
@@
int rdbLoad(char *filename) {
}
startLoading(fp);
- rdb = rioInitWithFile(fp);
while(1) {
robj *key, *val;
expiretime = -1;