diff options
Diffstat (limited to 'FICS/settings.cpp')
| -rw-r--r-- | FICS/settings.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/FICS/settings.cpp b/FICS/settings.cpp index 388a3cc..20c1dc2 100644 --- a/FICS/settings.cpp +++ b/FICS/settings.cpp @@ -133,12 +133,10 @@ install_setting(const char *name, const char *value) return EINVAL; for (auto it = settings.begin(); it != settings.end(); ++it) { if (strings_match((*it).name.c_str(), name)) { - if (!is_setting_ok(value, (*it).type)) { + if (!is_setting_ok(value, (*it).type)) return EINVAL; - } else { - (*it).value.assign(value); - return 0; - } + (*it).value.assign(value); + return 0; } } return ENOENT; |
