From: jca Date: Fri, 19 Jun 2015 23:54:15 +0000 (+0000) Subject: Tweak whitespace and remove dangling, unneeded "else". X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5ea3616786622987c10c31545f4e26bb03d96d1c;p=openbsd Tweak whitespace and remove dangling, unneeded "else". No functional change. --- 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; }