summaryrefslogtreecommitdiffstats
path: root/environ.c
diff options
context:
space:
mode:
authornicm <nicm>2019-04-23 20:36:55 +0000
committernicm <nicm>2019-04-23 20:36:55 +0000
commit772b3b7a06ceba64933cb3a9dfff61e56c229a74 (patch)
treeb39ae35756cf031dd8e7390f7f0882eb96a78e5a /environ.c
parent564e44adc6816282cd40d59d1bc642937e53dc54 (diff)
Indicate an array option with a flag rather than a special type so that
in future will not have to be strings.
Diffstat (limited to 'environ.c')
-rw-r--r--environ.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/environ.c b/environ.c
index 2764e027..301c4f29 100644
--- a/environ.c
+++ b/environ.c
@@ -177,20 +177,20 @@ environ_update(struct options *oo, struct environ *src, struct environ *dst)
struct environ_entry *envent;
struct options_entry *o;
struct options_array_item *a;
- const char *value;
+ union options_value *ov;
o = options_get(oo, "update-environment");
if (o == NULL)
return;
a = options_array_first(o);
while (a != NULL) {
- value = options_array_item_value(a);
- if (value == NULL) {
+ ov = options_array_item_value(a);
+ if (ov == NULL) {
a = options_array_next(a);
continue;
}
- if ((envent = environ_find(src, value)) == NULL)
- environ_clear(dst, value);
+ if ((envent = environ_find(src, ov->string)) == NULL)
+ environ_clear(dst, ov->string);
else
environ_set(dst, envent->name, "%s", envent->value);
a = options_array_next(a);