plugins: Make 'struct configdata' argument to the configfile helper const
So plugins can use const structures, possibly saving a little bit of RAM. Change-Id: I15b0ef20e7554caf5f6d1c12f6ab109ddf3c0dbd
This commit is contained in:
parent
08c4b708ae
commit
0d4752e3f6
2 changed files with 12 additions and 12 deletions
|
@ -42,7 +42,7 @@ static void get_cfg_filename(char* buf, int buf_len, const char* filename)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int configfile_save(const char *filename, struct configdata *cfg,
|
int configfile_save(const char *filename, const struct configdata *cfg,
|
||||||
int num_items, int version)
|
int num_items, int version)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
@ -91,7 +91,7 @@ int configfile_save(const char *filename, struct configdata *cfg,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int configfile_load(const char *filename, struct configdata *cfg,
|
int configfile_load(const char *filename, const struct configdata *cfg,
|
||||||
int num_items, int min_version)
|
int num_items, int min_version)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
|
@ -45,10 +45,10 @@ struct configdata
|
||||||
/* configfile_save - Given configdata entries this function will
|
/* configfile_save - Given configdata entries this function will
|
||||||
create a config file with these entries, destroying any
|
create a config file with these entries, destroying any
|
||||||
previous config file of the same name */
|
previous config file of the same name */
|
||||||
int configfile_save(const char *filename, struct configdata *cfg,
|
int configfile_save(const char *filename, const struct configdata *cfg,
|
||||||
int num_items, int version);
|
int num_items, int version);
|
||||||
|
|
||||||
int configfile_load(const char *filename, struct configdata *cfg,
|
int configfile_load(const char *filename, const struct configdata *cfg,
|
||||||
int num_items, int min_version);
|
int num_items, int min_version);
|
||||||
|
|
||||||
/* configfile_get_value - Given a key name, this function will
|
/* configfile_get_value - Given a key name, this function will
|
||||||
|
|
Loading…
Reference in a new issue