diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-18 22:21:51 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-18 22:21:51 +0000 |
commit | 99df48d70f10dcf8f95d4684262a3392d72ee9c6 (patch) | |
tree | e3e7768fa327c937e15a35579c8ce3362ff96f51 /compat | |
parent | 28aefe41623daba7685fe54ceb0b6952d5f6d98a (diff) |
Trimify.
Diffstat (limited to 'compat')
-rw-r--r-- | compat/asprintf.c | 4 | ||||
-rw-r--r-- | compat/forkpty-sunos.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/compat/asprintf.c b/compat/asprintf.c index 1f157046..f3ec7ef7 100644 --- a/compat/asprintf.c +++ b/compat/asprintf.c @@ -1,4 +1,4 @@ -/* $Id: asprintf.c,v 1.1 2008-06-18 20:12:19 nicm Exp $ */ +/* $Id: asprintf.c,v 1.2 2008-06-18 22:21:51 nicm Exp $ */ /* * Copyright (c) 2006 Nicholas Marriott <nicm@users.sourceforge.net> @@ -47,7 +47,7 @@ vasprintf(char **ret, const char *format, va_list ap) xfree(*ret); goto error; } - + return (n); error: diff --git a/compat/forkpty-sunos.c b/compat/forkpty-sunos.c index 51070f75..bc4fe8a3 100644 --- a/compat/forkpty-sunos.c +++ b/compat/forkpty-sunos.c @@ -1,4 +1,4 @@ -/* $Id: forkpty-sunos.c,v 1.4 2008-06-18 22:00:49 nicm Exp $ */ +/* $Id: forkpty-sunos.c,v 1.5 2008-06-18 22:21:51 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -39,12 +39,12 @@ forkpty(int *master, goto out; if (unlockpt(*master) != 0) goto out; - + if ((path = ptsname(*master)) == NULL) goto out; if ((slave = open(path, O_RDWR|O_NOCTTY)) == -1) goto out; - + switch (pid = fork()) { case -1: goto out; @@ -59,10 +59,10 @@ forkpty(int *master, fatal("ioctl failed"); if (ioctl(slave, I_PUSH, "ldterm") == -1) fatal("ioctl failed"); - + if (ioctl(slave, TIOCSWINSZ, ws) == -1) fatal("ioctl failed"); - + dup2(slave, 0); dup2(slave, 1); dup2(slave, 2); |