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

Unified Diff: fusl/src/stdio/__stdio_exit.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/stdio/__stdio_exit.c
diff --git a/fusl/src/stdio/__stdio_exit.c b/fusl/src/stdio/__stdio_exit.c
index 191b4454a48d3ff4258c2cd6dd5d29738d79620e..c433983f711b8cccdf6ff2a09b563aeb20bb21c0 100644
--- a/fusl/src/stdio/__stdio_exit.c
+++ b/fusl/src/stdio/__stdio_exit.c
@@ -1,24 +1,26 @@
#include "stdio_impl.h"
-static FILE *volatile dummy_file = 0;
+static FILE* volatile dummy_file = 0;
weak_alias(dummy_file, __stdin_used);
weak_alias(dummy_file, __stdout_used);
weak_alias(dummy_file, __stderr_used);
-static void close_file(FILE *f)
-{
- if (!f) return;
- FFINALLOCK(f);
- if (f->wpos > f->wbase) f->write(f, 0, 0);
- if (f->rpos < f->rend) f->seek(f, f->rpos-f->rend, SEEK_CUR);
+static void close_file(FILE* f) {
+ if (!f)
+ return;
+ FFINALLOCK(f);
+ if (f->wpos > f->wbase)
+ f->write(f, 0, 0);
+ if (f->rpos < f->rend)
+ f->seek(f, f->rpos - f->rend, SEEK_CUR);
}
-void __stdio_exit(void)
-{
- FILE *f;
- for (f=*__ofl_lock(); f; f=f->next) close_file(f);
- close_file(__stdin_used);
- close_file(__stdout_used);
+void __stdio_exit(void) {
+ FILE* f;
+ for (f = *__ofl_lock(); f; f = f->next)
+ close_file(f);
+ close_file(__stdin_used);
+ close_file(__stdout_used);
}
weak_alias(__stdio_exit, __stdio_exit_needed);

Powered by Google App Engine
This is Rietveld 408576698