summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/environ.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-04-23 20:36:56 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-04-23 20:36:56 +0000
commitce983935cc23e33b6a524267973a0db5c29a4e26 (patch)
treeea1f8ba39274bba333fccd8540fed5440f7915d7 /usr.bin/tmux/environ.c
parentd19051828a741fbbd1aa746a1f58198fe924aae2 (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 'usr.bin/tmux/environ.c')
-rw-r--r--usr.bin/tmux/environ.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/tmux/environ.c b/usr.bin/tmux/environ.c
index 2aa99f9cf58..d248ef0b966 100644
--- a/usr.bin/tmux/environ.c
+++ b/usr.bin/tmux/environ.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: environ.c,v 1.21 2019/03/18 11:58:40 nicm Exp $ */
+/* $OpenBSD: environ.c,v 1.22 2019/04/23 20:36:55 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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);