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

Unified Diff: fusl/src/temp/mktemp.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/temp/mktemp.c
diff --git a/fusl/src/temp/mktemp.c b/fusl/src/temp/mktemp.c
index 4ab0df2069ac6d0c685ea2265f15d40596392217..dea45e593783a85247f2bf2ae95c53cd7c935794 100644
--- a/fusl/src/temp/mktemp.c
+++ b/fusl/src/temp/mktemp.c
@@ -4,29 +4,29 @@
#include <errno.h>
#include <sys/stat.h>
-char *__randname(char *);
+char* __randname(char*);
-char *mktemp(char *template)
-{
- size_t l = strlen(template);
- int retries = 100;
- struct stat st;
+char* mktemp(char* template) {
+ size_t l = strlen(template);
+ int retries = 100;
+ struct stat st;
- if (l < 6 || memcmp(template+l-6, "XXXXXX", 6)) {
- errno = EINVAL;
- *template = 0;
- return template;
- }
+ if (l < 6 || memcmp(template + l - 6, "XXXXXX", 6)) {
+ errno = EINVAL;
+ *template = 0;
+ return template;
+ }
- do {
- __randname(template+l-6);
- if (stat(template, &st)) {
- if (errno != ENOENT) *template = 0;
- return template;
- }
- } while (--retries);
+ do {
+ __randname(template + l - 6);
+ if (stat(template, &st)) {
+ if (errno != ENOENT)
+ *template = 0;
+ return template;
+ }
+ } while (--retries);
- *template = 0;
- errno = EEXIST;
- return template;
+ *template = 0;
+ errno = EEXIST;
+ return template;
}

Powered by Google App Engine
This is Rietveld 408576698