Minor cleanup of param load / store

This commit is contained in:
Lorenz Meier
2012-11-15 17:19:52 +01:00
parent df5e4d1904
commit 7f916779df
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -517,13 +517,11 @@ param_save_default(void)
}
int result = param_export(fd, false);
/* should not be necessary, over-careful here */
fsync(fd);
close(fd);
if (result != 0) {
unlink(param_get_default_file());
warn("error exporting parameters to '%s'", param_get_default_file());
unlink(param_get_default_file());
return -2;
}