Skip to content

Commit

Permalink
More rioRead()
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed May 14, 2011
1 parent 221782c commit fd535c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -971,7 +972,6 @@ int rdbLoad(char *filename) {
}

startLoading(fp);
rdb = rioInitWithFile(fp);
while(1) {
robj *key, *val;
expiretime = -1;
Expand Down

0 comments on commit fd535c5

Please sign in to comment.