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

Unified Diff: runtime/bin/directory_fuchsia.cc

Issue 2480793002: clang-format runtime/bin (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « runtime/bin/directory_android.cc ('k') | runtime/bin/directory_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/directory_fuchsia.cc
diff --git a/runtime/bin/directory_fuchsia.cc b/runtime/bin/directory_fuchsia.cc
index 1593ff717244ac0ee173a7ae5cd3a89cbced5ca1..5223cb09bae66033111feacc9cce27d4aad6e64e 100644
--- a/runtime/bin/directory_fuchsia.cc
+++ b/runtime/bin/directory_fuchsia.cc
@@ -7,11 +7,11 @@
#include "bin/directory.h"
-#include <errno.h> // NOLINT
-#include <stdlib.h> // NOLINT
-#include <string.h> // NOLINT
+#include <errno.h> // NOLINT
+#include <stdlib.h> // NOLINT
+#include <string.h> // NOLINT
#include <sys/stat.h> // NOLINT
-#include <unistd.h> // NOLINT
+#include <unistd.h> // NOLINT
#include "bin/dartutils.h"
#include "bin/file.h"
@@ -60,13 +60,9 @@ bool PathBuffer::Add(const char* name) {
return false;
}
char* data = AsString();
- int written = snprintf(data + length_,
- PATH_MAX - length_,
- "%s",
- name);
+ int written = snprintf(data + length_, PATH_MAX - length_, "%s", name);
data[PATH_MAX] = '\0';
- if ((written <= (PATH_MAX - length_)) &&
- (written > 0) &&
+ if ((written <= (PATH_MAX - length_)) && (written > 0) &&
(static_cast<size_t>(written) == strnlen(name, PATH_MAX + 1))) {
length_ += written;
return true;
@@ -109,19 +105,14 @@ Directory::ExistsResult Directory::Exists(const char* dir_name) {
return DOES_NOT_EXIST;
}
} else {
- if ((errno == EACCES) ||
- (errno == EBADF) ||
- (errno == EFAULT) ||
- (errno == ENOMEM) ||
- (errno == EOVERFLOW)) {
+ if ((errno == EACCES) || (errno == EBADF) || (errno == EFAULT) ||
+ (errno == ENOMEM) || (errno == EOVERFLOW)) {
// Search permissions denied for one of the directories in the
// path or a low level error occured. We do not know if the
// directory exists.
return UNKNOWN;
}
- ASSERT((errno == ELOOP) ||
- (errno == ENAMETOOLONG) ||
- (errno == ENOENT) ||
+ ASSERT((errno == ELOOP) || (errno == ENAMETOOLONG) || (errno == ENOENT) ||
(errno == ENOTDIR));
return DOES_NOT_EXIST;
}
« no previous file with comments | « runtime/bin/directory_android.cc ('k') | runtime/bin/directory_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698