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;
}
+1 -1
View File
@@ -250,7 +250,7 @@ __EXPORT int param_set_default_file(const char* filename);
* a result of a call to param_set_default_file, or the
* built-in default.
*/
__EXPORT const char *param_get_default_file(void);
__EXPORT const char* param_get_default_file(void);
/**
* Save parameters to the default file.