From 5ea3616786622987c10c31545f4e26bb03d96d1c Mon Sep 17 00:00:00 2001 From: jca Date: Fri, 19 Jun 2015 23:54:15 +0000 Subject: [PATCH] Tweak whitespace and remove dangling, unneeded "else". No functional change. --- lib/libc/gen/ttyname.c | 9 +++++---- 1 file 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; } -- 2.20.1