summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/files/file_util_posix.cc2
-rw-r--r--base/sync_socket_posix.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/base/files/file_util_posix.cc b/base/files/file_util_posix.cc
index 802ed51..0e99b01 100644
--- a/base/files/file_util_posix.cc
+++ b/base/files/file_util_posix.cc
@@ -351,7 +351,7 @@ bool CopyDirectory(const FilePath& from_path,
#endif // !defined(OS_NACL_NONSFI)
bool SetNonBlocking(int fd) {
- int flags = fcntl(fd, F_GETFL, 0);
+ const int flags = fcntl(fd, F_GETFL);
if (flags == -1)
return false;
if (flags & O_NONBLOCK)
diff --git a/base/sync_socket_posix.cc b/base/sync_socket_posix.cc
index 7b9995ce..5d9e25e 100644
--- a/base/sync_socket_posix.cc
+++ b/base/sync_socket_posix.cc
@@ -222,7 +222,7 @@ size_t CancelableSyncSocket::Send(const void* buffer, size_t length) {
DCHECK_LE(length, kMaxMessageLength);
DCHECK_NE(handle_, kInvalidHandle);
- const long flags = fcntl(handle_, F_GETFL, NULL);
+ const int flags = fcntl(handle_, F_GETFL);
if (flags != -1 && (flags & O_NONBLOCK) == 0) {
// Set the socket to non-blocking mode for sending if its original mode
// is blocking.