diff options
author | Tiago Cunha <tcunha@gmx.com> | 2012-05-30 13:49:05 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2012-05-30 13:49:05 +0000 |
commit | e96d51424745d4a4a9574c39c3777e8c05311c22 (patch) | |
tree | 0e739bfa60d1e30f6d8b3104909c0b9842903df5 /cmd-kill-window.c | |
parent | bcda6eed63d08c960edf9756d07c4aab832a9266 (diff) | |
download | rtmux-e96d51424745d4a4a9574c39c3777e8c05311c22.tar.gz rtmux-e96d51424745d4a4a9574c39c3777e8c05311c22.tar.bz2 rtmux-e96d51424745d4a4a9574c39c3777e8c05311c22.zip |
Sync OpenBSD patchset 1129:
Use RB_FOREACH_SAFE as winlinks are being removed, from Chris Johnsen.
Diffstat (limited to 'cmd-kill-window.c')
-rw-r--r-- | cmd-kill-window.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-kill-window.c b/cmd-kill-window.c index abe7738e..ec2b1895 100644 --- a/cmd-kill-window.c +++ b/cmd-kill-window.c @@ -40,14 +40,14 @@ int cmd_kill_window_exec(struct cmd *self, struct cmd_ctx *ctx) { struct args *args = self->args; - struct winlink *wl, *wl2; + struct winlink *wl, *wl2, *wl3; struct session *s; if ((wl = cmd_find_window(ctx, args_get(args, 't'), &s)) == NULL) return (-1); if (args_has(args, 'a')) { - RB_FOREACH(wl2, winlinks, &s->windows) { + RB_FOREACH_SAFE(wl2, winlinks, &s->windows, wl3) { if (wl != wl2) server_kill_window(wl2->window); } |