aboutsummaryrefslogtreecommitdiff
path: root/environ.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-04-23 23:02:42 +0100
committerThomas Adam <thomas@xteddy.org>2019-04-23 23:02:42 +0100
commitc86936613366fe1a0d7a4a2d4ae628d04cd3b866 (patch)
tree88c945ce503cb9df4332904d5887d68b8b843fde /environ.c
parentb0d7623b7eb4409eedde0583be6ed831b287d278 (diff)
parentb9022e33eac0152850ae59be99b54cccc10f4c63 (diff)
downloadrtmux-c86936613366fe1a0d7a4a2d4ae628d04cd3b866.tar.gz
rtmux-c86936613366fe1a0d7a4a2d4ae628d04cd3b866.tar.bz2
rtmux-c86936613366fe1a0d7a4a2d4ae628d04cd3b866.zip
Merge branch 'obsd-master'
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);