From 7bef6f878783016d1da247f486c0bc3c4c58d237 Mon Sep 17 00:00:00 2001 From: derselbst Date: Fri, 22 Sep 2017 15:18:32 +0200 Subject: [PATCH] fix return value checks --- src/utils/fluid_settings.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/fluid_settings.c b/src/utils/fluid_settings.c index 2b0d1154..4dfd2843 100644 --- a/src/utils/fluid_settings.c +++ b/src/utils/fluid_settings.c @@ -463,7 +463,7 @@ fluid_settings_register_str(fluid_settings_t* settings, const char* name, const fluid_rec_mutex_lock (settings->mutex); - if (!fluid_settings_get(settings, name, &node)) { + if (fluid_settings_get(settings, name, &node) != FLUID_OK) { setting = new_fluid_str_setting(def, def, hints, fun, data); retval = fluid_settings_set(settings, name, setting); if (retval != FLUID_OK) delete_fluid_str_setting (setting); @@ -516,7 +516,7 @@ fluid_settings_register_num(fluid_settings_t* settings, const char* name, double fluid_rec_mutex_lock (settings->mutex); - if (!fluid_settings_get(settings, name, &node)) { + if (fluid_settings_get(settings, name, &node) != FLUID_OK) { /* insert a new setting */ fluid_num_setting_t* setting; setting = new_fluid_num_setting(min, max, def, hints, fun, data); @@ -574,7 +574,7 @@ fluid_settings_register_int(fluid_settings_t* settings, const char* name, int de fluid_rec_mutex_lock (settings->mutex); - if (!fluid_settings_get(settings, name, &node)) { + if (fluid_settings_get(settings, name, &node) != FLUID_OK) { /* insert a new setting */ fluid_int_setting_t* setting; setting = new_fluid_int_setting(min, max, def, hints, fun, data);