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

Unified Diff: runtime/bin/fdutils_macos.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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
« no previous file with comments | « runtime/bin/fdutils_linux.cc ('k') | runtime/bin/file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/fdutils_macos.cc
diff --git a/runtime/bin/fdutils_macos.cc b/runtime/bin/fdutils_macos.cc
index 9da95a89e835035247e0ff7abc8fb2d4e2810d2e..e6915061273421ac42733e3f5eb6530736147b4e 100644
--- a/runtime/bin/fdutils_macos.cc
+++ b/runtime/bin/fdutils_macos.cc
@@ -32,7 +32,6 @@ bool FDUtils::SetCloseOnExec(intptr_t fd) {
return true;
}
-
static bool SetBlockingHelper(intptr_t fd, bool blocking) {
intptr_t status;
status = NO_RETRY_EXPECTED(fcntl(fd, F_GETFL));
@@ -48,17 +47,14 @@ static bool SetBlockingHelper(intptr_t fd, bool blocking) {
return true;
}
-
bool FDUtils::SetNonBlocking(intptr_t fd) {
return SetBlockingHelper(fd, false);
}
-
bool FDUtils::SetBlocking(intptr_t fd) {
return SetBlockingHelper(fd, true);
}
-
bool FDUtils::IsBlocking(intptr_t fd, bool* is_blocking) {
intptr_t status;
status = NO_RETRY_EXPECTED(fcntl(fd, F_GETFL));
@@ -69,7 +65,6 @@ bool FDUtils::IsBlocking(intptr_t fd, bool* is_blocking) {
return true;
}
-
intptr_t FDUtils::AvailableBytes(intptr_t fd) {
int available; // ioctl for FIONREAD expects an 'int*' argument.
int result = NO_RETRY_EXPECTED(ioctl(fd, FIONREAD, &available));
@@ -80,7 +75,6 @@ intptr_t FDUtils::AvailableBytes(intptr_t fd) {
return static_cast<intptr_t>(available);
}
-
ssize_t FDUtils::ReadFromBlocking(int fd, void* buffer, size_t count) {
#ifdef DEBUG
bool is_blocking = false;
@@ -108,7 +102,6 @@ ssize_t FDUtils::ReadFromBlocking(int fd, void* buffer, size_t count) {
return count;
}
-
ssize_t FDUtils::WriteToBlocking(int fd, const void* buffer, size_t count) {
#ifdef DEBUG
bool is_blocking = false;
@@ -137,7 +130,6 @@ ssize_t FDUtils::WriteToBlocking(int fd, const void* buffer, size_t count) {
return count;
}
-
void FDUtils::SaveErrorAndClose(intptr_t fd) {
int err = errno;
VOID_TEMP_FAILURE_RETRY(close(fd));
« no previous file with comments | « runtime/bin/fdutils_linux.cc ('k') | runtime/bin/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698