summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-queue.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-09-16 22:24:54 +0000
committernicm <nicm@openbsd.org>2015-09-16 22:24:54 +0000
commit722808c8fad8653f891591b755e7ea698c962495 (patch)
tree984adc266a23de5c15777fccbb1bd2aa4b60f8d1 /usr.bin/tmux/cmd-queue.c
parentAnother ifmedia64 fix, this time for bgpd's ift2ifm(). (diff)
downloadwireguard-openbsd-722808c8fad8653f891591b755e7ea698c962495.tar.xz
wireguard-openbsd-722808c8fad8653f891591b755e7ea698c962495.zip
Rename cmd_q dead flag to a general flags bitmask (will be more flags later).
Diffstat (limited to 'usr.bin/tmux/cmd-queue.c')
-rw-r--r--usr.bin/tmux/cmd-queue.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c
index 72ed7fbb908..b010ff78294 100644
--- a/usr.bin/tmux/cmd-queue.c
+++ b/usr.bin/tmux/cmd-queue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-queue.c,v 1.24 2015/06/17 17:02:15 nicm Exp $ */
+/* $OpenBSD: cmd-queue.c,v 1.25 2015/09/16 22:24:54 nicm Exp $ */
/*
* Copyright (c) 2013 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -35,7 +35,7 @@ cmdq_new(struct client *c)
cmdq = xcalloc(1, sizeof *cmdq);
cmdq->references = 1;
- cmdq->dead = 0;
+ cmdq->flags = 0;
cmdq->client = c;
cmdq->client_exit = -1;
@@ -51,8 +51,11 @@ cmdq_new(struct client *c)
int
cmdq_free(struct cmd_q *cmdq)
{
- if (--cmdq->references != 0)
- return (cmdq->dead);
+ if (--cmdq->references != 0) {
+ if (cmdq->flags & CMD_Q_DEAD)
+ return (1);
+ return (0);
+ }
cmdq_flush(cmdq);
free(cmdq);