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

Side by Side Diff: fusl/src/stdio/__towrite.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 "stdio_impl.h" 1 #include "stdio_impl.h"
2 2
3 int __towrite(FILE *f) 3 int __towrite(FILE* f) {
4 { 4 f->mode |= f->mode - 1;
5 » f->mode |= f->mode-1; 5 if (f->flags & (F_NOWR)) {
6 » if (f->flags & (F_NOWR)) { 6 f->flags |= F_ERR;
7 » » f->flags |= F_ERR; 7 return EOF;
8 » » return EOF; 8 }
9 » } 9 /* Clear read buffer (easier than summoning nasal demons) */
10 » /* Clear read buffer (easier than summoning nasal demons) */ 10 f->rpos = f->rend = 0;
11 » f->rpos = f->rend = 0;
12 11
13 » /* Activate write through the buffer. */ 12 /* Activate write through the buffer. */
14 » f->wpos = f->wbase = f->buf; 13 f->wpos = f->wbase = f->buf;
15 » f->wend = f->buf + f->buf_size; 14 f->wend = f->buf + f->buf_size;
16 15
17 » return 0; 16 return 0;
18 } 17 }
19 18
20 void __stdio_exit_needed(void); 19 void __stdio_exit_needed(void);
21 20
22 void __towrite_needs_stdio_exit() 21 void __towrite_needs_stdio_exit() {
23 { 22 __stdio_exit_needed();
24 » __stdio_exit_needed();
25 } 23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698