diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-12-10 07:58:00 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-12-10 07:58:00 +0000 |
commit | 5bc8b2b7b61b9c73f34253e97999a688664f3b7f (patch) | |
tree | c5a55731526c2baadfbf8ec7a4898a0504b5b903 /tty.c | |
parent | 7162d824f038ec120e4c9588a507bf6884b81df5 (diff) | |
download | rtmux-5bc8b2b7b61b9c73f34253e97999a688664f3b7f.tar.gz rtmux-5bc8b2b7b61b9c73f34253e97999a688664f3b7f.tar.bz2 rtmux-5bc8b2b7b61b9c73f34253e97999a688664f3b7f.zip |
Actually incrementing the reference count would be nice.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: tty.c,v 1.15 2007-12-06 21:57:57 nicm Exp $ */ +/* $Id: tty.c,v 1.16 2007-12-10 07:58:00 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -167,8 +167,10 @@ tty_find_term(char *name, int fd, char **cause) int error; TAILQ_FOREACH(term, &tty_terms, entry) { - if (strcmp(term->name, name) == 0) + if (strcmp(term->name, name) == 0) { + term->references++; return (term); + } } term = xmalloc(sizeof *term); |