summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_posix.cc
diff options
context:
space:
mode:
authordavid.mike.futcher@gmail.com <david.mike.futcher@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-18 20:07:08 +0000
committerdavid.mike.futcher@gmail.com <david.mike.futcher@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-18 20:07:08 +0000
commit60ea605e068242f3dd5500e081b940a1de7370f2 (patch)
treea7d3bbb61f7d794d1646ed5a7ebfd7c0ac13acf8 /ipc/ipc_channel_posix.cc
parentc13014b1b5e1a8a5a6faef68ee9ad3ec123424a8 (diff)
downloadchromium_src-60ea605e068242f3dd5500e081b940a1de7370f2.zip
chromium_src-60ea605e068242f3dd5500e081b940a1de7370f2.tar.gz
chromium_src-60ea605e068242f3dd5500e081b940a1de7370f2.tar.bz2
Replacing outdated DCHECK(a == b) with DCHECK_EQ(a, b).
This is my first attempt at contributing, so please tell me where I'm going wrong. BUG=58409 TEST= Review URL: http://codereview.chromium.org/6851016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81988 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_posix.cc')
-rw-r--r--ipc/ipc_channel_posix.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 22e4781..9d908b8 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -116,7 +116,7 @@ class PipeMap {
// mapping if one already exists for the given channel_id
void Insert(const std::string& channel_id, int fd) {
base::AutoLock locked(lock_);
- DCHECK(fd != -1);
+ DCHECK_NE(-1, fd);
ChannelToFDMap::const_iterator i = map_.find(channel_id);
CHECK(i == map_.end()) << "Creating second IPC server (fd " << fd << ") "
@@ -556,7 +556,7 @@ bool Channel::ChannelImpl::ProcessIncomingMessages() {
if (cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_RIGHTS) {
const unsigned payload_len = cmsg->cmsg_len - CMSG_LEN(0);
- DCHECK(payload_len % sizeof(int) == 0);
+ DCHECK_EQ(0U, payload_len % sizeof(int));
wire_fds = reinterpret_cast<int*>(CMSG_DATA(cmsg));
num_wire_fds = payload_len / 4;
@@ -636,7 +636,7 @@ bool Channel::ChannelImpl::ProcessIncomingMessages() {
if (cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_RIGHTS) {
const unsigned payload_len = cmsg->cmsg_len - CMSG_LEN(0);
- DCHECK(payload_len % sizeof(int) == 0);
+ DCHECK_EQ(0U, payload_len % sizeof(int));
wire_fds = reinterpret_cast<int*>(CMSG_DATA(cmsg));
num_wire_fds = payload_len / 4;
@@ -769,7 +769,7 @@ bool Channel::ChannelImpl::ProcessOutgoingMessages() {
Message* msg = output_queue_.front();
size_t amt_to_write = msg->size() - message_send_bytes_written_;
- DCHECK(amt_to_write != 0);
+ DCHECK_NE(0U, amt_to_write);
const char* out_bytes = reinterpret_cast<const char*>(msg->data()) +
message_send_bytes_written_;
@@ -1057,7 +1057,7 @@ void Channel::ChannelImpl::OnFileCanReadWithoutBlocking(int fd) {
// Called by libevent when we can write to the pipe without blocking.
void Channel::ChannelImpl::OnFileCanWriteWithoutBlocking(int fd) {
- DCHECK(fd == pipe_);
+ DCHECK_EQ(pipe_, fd);
is_blocked_on_write_ = false;
if (!ProcessOutgoingMessages()) {
ClosePipeOnError();