summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-07-13 15:51:31 +0000
committernicm <nicm@openbsd.org>2015-07-13 15:51:31 +0000
commitbd23a6349a8f8eca917153cc46dba16bfe9ca923 (patch)
tree795fc0e56eac78810aa1bcb9490240686dbf31a3 /usr.bin/tmux/tty.c
parentInitialize cwd fd to -1 so that we don't close fd 0 if the client is (diff)
downloadwireguard-openbsd-bd23a6349a8f8eca917153cc46dba16bfe9ca923.tar.xz
wireguard-openbsd-bd23a6349a8f8eca917153cc46dba16bfe9ca923.zip
Fix line endings.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 09dc381626d..2d747564c33 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.184 2015/07/13 15:49:31 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.185 2015/07/13 15:51:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -59,14 +59,14 @@ void tty_default_colours(struct grid_cell *, const struct window_pane *);
#define tty_pane_full_width(tty, ctx) \
((ctx)->xoff == 0 && screen_size_x((ctx)->wp->screen) >= (tty)->sx)
-int
+int
tty_init(struct tty *tty, struct client *c, int fd, char *term)
{
char *path;
- if (!isatty(fd))
- return (-1);
-
+ if (!isatty(fd))
+ return (-1);
+
memset(tty, 0, sizeof *tty);
tty->log_fd = -1;
@@ -78,15 +78,15 @@ tty_init(struct tty *tty, struct client *c, int fd, char *term)
tty->client = c;
if ((path = ttyname(fd)) == NULL)
- return (-1);
+ return (-1);
tty->path = xstrdup(path);
tty->cstyle = 0;
tty->ccolour = xstrdup("");
tty->flags = 0;
tty->term_flags = 0;
-
- return (0);
+
+ return (0);
}
int