Make environ_set va_args and use it to tidy up some calls. Also add a

missing word in manpage (from jmc).
This commit is contained in:
nicm
2015-11-24 23:46:15 +00:00
parent 3ff46b2e43
commit 62d3af17f9
7 changed files with 48 additions and 30 deletions

View File

@ -79,13 +79,13 @@ cmd_set_environment_exec(struct cmd *self, struct cmd_q *cmdq)
cmdq_error(cmdq, "can't specify a value with -r");
return (CMD_RETURN_ERROR);
}
environ_set(env, name, NULL);
environ_clear(env, name);
} else {
if (value == NULL) {
cmdq_error(cmdq, "no value specified");
return (CMD_RETURN_ERROR);
}
environ_set(env, name, value);
environ_set(env, name, "%s", value);
}
return (CMD_RETURN_NORMAL);