Explicitly check C_ERR condition to improve readability in clusterSaveConfig (#1505)
It's not obvious to see it at first, modify it to use C_ERR. Signed-off-by: Binbin <binloveplay1314@qq.com>
This commit is contained in:
parent
b3b4bdcda4
commit
33b824137e
@ -868,7 +868,7 @@ int clusterSaveConfig(int do_fsync) {
|
||||
|
||||
cleanup:
|
||||
if (fd != -1) close(fd);
|
||||
if (retval) unlink(tmpfilename);
|
||||
if (retval == C_ERR) unlink(tmpfilename);
|
||||
sdsfree(tmpfilename);
|
||||
sdsfree(ci);
|
||||
return retval;
|
||||
|
Loading…
x
Reference in New Issue
Block a user