]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rdma: Assign instead of compare 16664/head
authoramitkuma <amitkuma@redhat.com>
Sat, 29 Jul 2017 00:39:45 +0000 (06:09 +0530)
committeramitkuma <amitkuma@redhat.com>
Sun, 30 Jul 2017 23:22:01 +0000 (04:52 +0530)
Fixed:

** CID 1414508 (#1 of 1): Assign instead of compare (PW.ASSIGN_WHERE_COMPARE_MEANT)
1. assign_where_compare_meant: use of "=" where "==" may have been intended

Signed-off-by: Amit Kumar amitkuma@redhat.com
src/msg/async/rdma/RDMAConnectedSocketImpl.cc

index 66dc488cccf3fc7a6b27935a2be6412886304995..be5333358e16bf93cbbacb97adbca795ea897fa9 100644 (file)
@@ -599,11 +599,8 @@ void RDMAConnectedSocketImpl::cleanup() {
 
 void RDMAConnectedSocketImpl::notify()
 {
-  uint64_t i = 1;
-  int ret;
-
-  ret = write(notify_fd, &i, sizeof(i));
-  assert(ret = sizeof(i));
+  int i = 1;
+  assert(sizeof(i) == write(notify_fd, &i, sizeof(i)));
 }
 
 void RDMAConnectedSocketImpl::shutdown()