confile: cleanup set_config_log_level()

parent 806244c6
...@@ -1595,16 +1595,19 @@ static int set_config_log_level(const char *key, const char *value, ...@@ -1595,16 +1595,19 @@ static int set_config_log_level(const char *key, const char *value,
static int set_config_autodev(const char *key, const char *value, static int set_config_autodev(const char *key, const char *value,
struct lxc_conf *lxc_conf, void *data) struct lxc_conf *lxc_conf, void *data)
{ {
int ret;
if (lxc_config_value_empty(value)) { if (lxc_config_value_empty(value)) {
lxc_conf->autodev = 0; lxc_conf->autodev = 0;
return 0; return 0;
} }
if (lxc_safe_uint(value, &lxc_conf->autodev) < 0) ret = lxc_safe_uint(value, &lxc_conf->autodev);
return -1; if (ret)
return ret_errno(EINVAL);
if (lxc_conf->autodev > 1) if (lxc_conf->autodev > 1)
return -1; return ret_errno(EINVAL);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment