diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2021-02-17 11:07:45 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2021-02-17 11:07:45 -0800 |
commit | 55db80c6970b8643b4777c3b5586531e2d2e7469 (patch) | |
tree | ab4178a33ebc1c8d77ec6669a6c0d433574257c8 /src/settings.h | |
parent | 9e56788affedd6b01df6764732a4ba786f7a47f3 (diff) |
fb,settings: return NULL from _free() methods
and ignore NULL parameters as benign
Diffstat (limited to 'src/settings.h')
-rw-r--r-- | src/settings.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/settings.h b/src/settings.h index c538531..9916ebb 100644 --- a/src/settings.h +++ b/src/settings.h @@ -24,7 +24,7 @@ typedef struct setting_desc_generator_t { typedef struct settings_t settings_t; settings_t * settings_new(const char *settings); -void settings_free(settings_t *settings); +settings_t * settings_free(settings_t *settings); const char * settings_get_value(const settings_t *settings, const char *key); const char * settings_get_key(const settings_t *settings, unsigned pos); int settings_add_value(settings_t *settings, const char *key, const char *value); @@ -32,7 +32,7 @@ char * settings_as_arg(const settings_t *settings); int settings_apply_desc_generators(const settings_t *settings, const setting_desc_generator_t generators[], unsigned n_generators, void *setup_context, setting_desc_t **next_setting); int setting_desc_clone(const setting_desc_t *desc, setting_desc_t **res_desc); -void setting_desc_free(setting_desc_t *desc); +setting_desc_t * setting_desc_free(setting_desc_t *desc); int setting_desc_check(const setting_desc_t *desc, const char *value); #ifndef SETTINGS_STR |