Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(656)

Unified Diff: fusl/src/unistd/ttyname.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fusl/src/unistd/ttyname.c
diff --git a/fusl/src/unistd/ttyname.c b/fusl/src/unistd/ttyname.c
index 0f3e11411b068ec820b5e4212ba57d9dd6b59e54..096e72e3d37d5e99048ae46035ed9b6ebc844d2d 100644
--- a/fusl/src/unistd/ttyname.c
+++ b/fusl/src/unistd/ttyname.c
@@ -2,13 +2,12 @@
#include <errno.h>
#include <limits.h>
-char *ttyname(int fd)
-{
- static char buf[TTY_NAME_MAX];
- int result;
- if ((result = ttyname_r(fd, buf, sizeof buf))) {
- errno = result;
- return NULL;
- }
- return buf;
+char* ttyname(int fd) {
+ static char buf[TTY_NAME_MAX];
+ int result;
+ if ((result = ttyname_r(fd, buf, sizeof buf))) {
+ errno = result;
+ return NULL;
+ }
+ return buf;
}

Powered by Google App Engine
This is Rietveld 408576698