diff options
author | 2017-07-12 09:07:52 +0000 | |
---|---|---|
committer | 2017-07-12 09:07:52 +0000 | |
commit | f7772d13f1691ba12beb3695935166d3ca29fd4a (patch) | |
tree | da8e2e454f9eb1029adeba246096628f89843285 /usr.bin | |
parent | Compute the level of contention only once. (diff) | |
download | wireguard-openbsd-f7772d13f1691ba12beb3695935166d3ca29fd4a.tar.xz wireguard-openbsd-f7772d13f1691ba12beb3695935166d3ca29fd4a.zip |
proc_send_s now seems unnecessary.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/proc.c | 8 | ||||
-rw-r--r-- | usr.bin/tmux/server-client.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/server-fn.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 3 |
4 files changed, 7 insertions, 14 deletions
diff --git a/usr.bin/tmux/proc.c b/usr.bin/tmux/proc.c index 99a363009d2..0d9625314e7 100644 --- a/usr.bin/tmux/proc.c +++ b/usr.bin/tmux/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.10 2017/06/07 15:27:46 nicm Exp $ */ +/* $OpenBSD: proc.c,v 1.11 2017/07/12 09:07:52 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -161,12 +161,6 @@ proc_send(struct tmuxpeer *peer, enum msgtype type, int fd, const void *buf, return (0); } -int -proc_send_s(struct tmuxpeer *peer, enum msgtype type, const char *s) -{ - return (proc_send(peer, type, -1, s, strlen(s) + 1)); -} - struct tmuxproc * proc_start(const char *name, struct event_base *base, int forkflag, void (*signalcb)(int)) diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 7b7ef2bc95a..f303035f577 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.239 2017/06/13 07:12:33 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.240 2017/07/12 09:07:52 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -371,7 +371,7 @@ server_client_detach(struct client *c, enum msgtype msgtype) c->flags |= CLIENT_DETACHING; notify_client("client-detached", c); - proc_send_s(c->peer, msgtype, s->name); + proc_send(c->peer, msgtype, -1, s->name, strlen(s->name) + 1); } /* Execute command to replace a client. */ @@ -1721,7 +1721,7 @@ server_client_dispatch_shell(struct client *c) shell = options_get_string(global_s_options, "default-shell"); if (*shell == '\0' || areshell(shell)) shell = _PATH_BSHELL; - proc_send_s(c->peer, MSG_SHELL, shell); + proc_send(c->peer, MSG_SHELL, -1, shell, strlen(shell) + 1); proc_kill_peer(c->peer); } diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c index aa707ecb7c2..49e8e19585b 100644 --- a/usr.bin/tmux/server-fn.c +++ b/usr.bin/tmux/server-fn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-fn.c,v 1.109 2017/07/09 22:33:09 nicm Exp $ */ +/* $OpenBSD: server-fn.c,v 1.110 2017/07/12 09:07:52 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -173,7 +173,7 @@ server_lock_client(struct client *c) tty_raw(&c->tty, tty_term_string(c->tty.term, TTYC_E3)); c->flags |= CLIENT_SUSPENDED; - proc_send_s(c->peer, MSG_LOCK, cmd); + proc_send(c->peer, MSG_LOCK, -1, cmd, strlen(cmd) + 1); } void diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 41dfb9e1a6b..460f91bdf01 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.792 2017/07/09 22:33:09 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.793 2017/07/12 09:07:52 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1493,7 +1493,6 @@ const char *find_home(void); /* proc.c */ struct imsg; int proc_send(struct tmuxpeer *, enum msgtype, int, const void *, size_t); -int proc_send_s(struct tmuxpeer *, enum msgtype, const char *); struct tmuxproc *proc_start(const char *, struct event_base *, int, void (*)(int)); void proc_loop(struct tmuxproc *, int (*)(void)); |