=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/notify.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- src/usr.bin/tmux/notify.c 2016/10/16 19:15:02 1.15 +++ src/usr.bin/tmux/notify.c 2016/10/16 19:36:37 1.16 @@ -1,4 +1,4 @@ -/* $OpenBSD: notify.c,v 1.15 2016/10/16 19:15:02 nicm Exp $ */ +/* $OpenBSD: notify.c,v 1.16 2016/10/16 19:36:37 nicm Exp $ */ /* * Copyright (c) 2012 George Nachman @@ -59,7 +59,7 @@ const char *name; struct cmd_find_state fs; struct hook *hook; - struct cmdq_item *new_item, *loop; + struct cmdq_item *new_item; name = notify_hooks[ne->type]; if (name == NULL) @@ -83,10 +83,7 @@ log_debug("notify hook %s", name); new_item = cmdq_get_command(hook->cmdlist, &fs, NULL, CMDQ_NOHOOKS); - - for (loop = new_item; loop != NULL; loop = loop->next) - loop->hook = xstrdup(name); - + cmdq_format(new_item, "hook", "%s", name); cmdq_insert_after(item, new_item); }