summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2015-06-19 23:54:16 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2015-06-19 23:54:16 +0000
commit2efa7300fb7d762cd4fcd6d6e6f4854f6969d6a2 (patch)
treeb45af620cec200702c733e692ed249ede5b146ac /lib/libc
parent87db91a9788753a5fb6b89fa0cec08378a86da77 (diff)
Tweak whitespace and remove dangling, unneeded "else".
No functional change.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/ttyname.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/gen/ttyname.c b/lib/libc/gen/ttyname.c
index fa75c4bc59f..e8a27d64479 100644
--- a/lib/libc/gen/ttyname.c
+++ b/lib/libc/gen/ttyname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ttyname.c,v 1.13 2007/05/23 18:30:07 kurt Exp $ */
+/* $OpenBSD: ttyname.c,v 1.14 2015/06/19 23:54:15 jca Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -48,17 +48,18 @@ char *
ttyname(int fd)
{
_THREAD_PRIVATE_KEY(ttyname);
- char * bufp = (char*) _THREAD_PRIVATE(ttyname, buf, NULL);
+ char *bufp = (char *) _THREAD_PRIVATE(ttyname, buf, NULL);
int err;
- if (bufp == NULL)
+ if (bufp == NULL)
return NULL;
+
err = ttyname_r(fd, bufp, sizeof buf);
if (err) {
errno = err;
return NULL;
}
- else
+
return bufp;
}