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

Side by Side 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 unified diff | Download patch
OLDNEW
1 #include <unistd.h> 1 #include <unistd.h>
2 #include <errno.h> 2 #include <errno.h>
3 #include <limits.h> 3 #include <limits.h>
4 4
5 char *ttyname(int fd) 5 char* ttyname(int fd) {
6 { 6 static char buf[TTY_NAME_MAX];
7 » static char buf[TTY_NAME_MAX]; 7 int result;
8 » int result; 8 if ((result = ttyname_r(fd, buf, sizeof buf))) {
9 » if ((result = ttyname_r(fd, buf, sizeof buf))) { 9 errno = result;
10 » » errno = result; 10 return NULL;
11 » » return NULL; 11 }
12 » } 12 return buf;
13 » return buf;
14 } 13 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698