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

Unified Diff: fusl/src/dirent/opendir.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/dirent/opendir.c
diff --git a/fusl/src/dirent/opendir.c b/fusl/src/dirent/opendir.c
index 5cb84e303feea1746c64e3b255bd7fe76389e49b..c9b64e330dc5c25336db0962813efac6ea63ff9b 100644
--- a/fusl/src/dirent/opendir.c
+++ b/fusl/src/dirent/opendir.c
@@ -5,17 +5,16 @@
#include "__dirent.h"
#include "syscall.h"
-DIR *opendir(const char *name)
-{
- int fd;
- DIR *dir;
+DIR* opendir(const char* name) {
+ int fd;
+ DIR* dir;
- if ((fd = open(name, O_RDONLY|O_DIRECTORY|O_CLOEXEC)) < 0)
- return 0;
- if (!(dir = calloc(1, sizeof *dir))) {
- __syscall(SYS_close, fd);
- return 0;
- }
- dir->fd = fd;
- return dir;
+ if ((fd = open(name, O_RDONLY | O_DIRECTORY | O_CLOEXEC)) < 0)
+ return 0;
+ if (!(dir = calloc(1, sizeof *dir))) {
+ __syscall(SYS_close, fd);
+ return 0;
+ }
+ dir->fd = fd;
+ return dir;
}

Powered by Google App Engine
This is Rietveld 408576698