mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-20 20:03:54 +08:00
Minor cleanup of param load / store
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user