diff options
author | nicm <nicm> | 2015-10-28 09:51:55 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-10-28 09:51:55 +0000 |
commit | bf9c933caed5c74be3c9c4da02d7c57a9dcf091d (patch) | |
tree | 533de8449d76a2bb151f883f99f80ba73f0c987e /cmd-show-environment.c | |
parent | 44657bf932b068aff5ce1019a4e8a2e7b00b5321 (diff) | |
download | rtmux-bf9c933caed5c74be3c9c4da02d7c57a9dcf091d.tar.gz rtmux-bf9c933caed5c74be3c9c4da02d7c57a9dcf091d.tar.bz2 rtmux-bf9c933caed5c74be3c9c4da02d7c57a9dcf091d.zip |
Like options, move the environ struct into environ.c.
Diffstat (limited to 'cmd-show-environment.c')
-rw-r--r-- | cmd-show-environment.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cmd-show-environment.c b/cmd-show-environment.c index af24d91b..96cfa289 100644 --- a/cmd-show-environment.c +++ b/cmd-show-environment.c @@ -91,12 +91,12 @@ cmd_show_environment_exec(struct cmd *self, struct cmd_q *cmdq) struct environ_entry *envent; if (args_has(self->args, 'g')) - env = &global_environ; + env = global_environ; else { s = cmd_find_session(cmdq, args_get(args, 't'), 0); if (s == NULL) return (CMD_RETURN_ERROR); - env = &s->environ; + env = s->environ; } if (args->argc != 0) { @@ -109,7 +109,10 @@ cmd_show_environment_exec(struct cmd *self, struct cmd_q *cmdq) return (CMD_RETURN_NORMAL); } - RB_FOREACH(envent, environ, env) + envent = environ_first(env); + while (envent != NULL) { cmd_show_environment_print(self, cmdq, envent); + envent = environ_next(envent); + } return (CMD_RETURN_NORMAL); } |