=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-show-environment.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- src/usr.bin/tmux/cmd-show-environment.c 2015/08/30 15:43:40 1.11 +++ src/usr.bin/tmux/cmd-show-environment.c 2015/10/28 09:51:55 1.12 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-show-environment.c,v 1.11 2015/08/30 15:43:40 nicm Exp $ */ +/* $OpenBSD: cmd-show-environment.c,v 1.12 2015/10/28 09:51:55 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -91,12 +91,12 @@ 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 @@ 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); }