rdbLoad(): rework code to save vertical space.

This commit is contained in:
antirez 2013-03-12 19:46:33 +01:00
parent 9925c7c670
commit 79a6844e44

View File

@ -1067,10 +1067,8 @@ int rdbLoad(char *filename) {
FILE *fp; FILE *fp;
rio rdb; rio rdb;
fp = fopen(filename,"r"); if ((fp = fopen(filename,"r")) == NULL) return REDIS_ERR;
if (!fp) {
return REDIS_ERR;
}
rioInitWithFile(&rdb,fp); rioInitWithFile(&rdb,fp);
if (server.rdb_checksum) if (server.rdb_checksum)
rdb.update_cksum = rioGenericUpdateChecksum; rdb.update_cksum = rioGenericUpdateChecksum;