From patchwork Thu Nov 2 13:51:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Shaia X-Patchwork-Id: 10038767 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D00E0603B5 for ; Thu, 2 Nov 2017 13:51:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B93B328E24 for ; Thu, 2 Nov 2017 13:51:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADE7828FFD; Thu, 2 Nov 2017 13:51:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD26228FF0 for ; Thu, 2 Nov 2017 13:51:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932176AbdKBNvx (ORCPT ); Thu, 2 Nov 2017 09:51:53 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:49670 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755205AbdKBNvx (ORCPT ); Thu, 2 Nov 2017 09:51:53 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vA2DpkQu027781 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Nov 2017 13:51:47 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vA2Dpj9c029324 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Nov 2017 13:51:46 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vA2DpjKw017276; Thu, 2 Nov 2017 13:51:45 GMT Received: from localhost.localdomain (/77.138.186.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 02 Nov 2017 06:51:45 -0700 From: Yuval Shaia To: sean.hefty@intel.com, hal@dev.mellanox.co.il, linux-rdma@vger.kernel.org Cc: Yuval Shaia Subject: [PATCH rdma-core] librdmacm: Remove unneeded condition Date: Thu, 2 Nov 2017 15:51:34 +0200 Message-Id: <20171102135134.5728-1-yuval.shaia@oracle.com> X-Mailer: git-send-email 2.13.6 X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The check makes no difference - remove it. Signed-off-by: Yuval Shaia --- librdmacm/cma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/librdmacm/cma.c b/librdmacm/cma.c index 7aaf45f2..6eebe71b 100644 --- a/librdmacm/cma.c +++ b/librdmacm/cma.c @@ -880,8 +880,8 @@ static int rdma_resolve_addr2(struct rdma_cm_id *id, struct sockaddr *src_addr, CMA_INIT_CMD(&cmd, sizeof cmd, RESOLVE_ADDR); id_priv = container_of(id, struct cma_id_private, id); cmd.id = id_priv->handle; - if ((cmd.src_size = src_len)) - memcpy(&cmd.src_addr, src_addr, src_len); + cmd.src_size = src_len; + memcpy(&cmd.src_addr, src_addr, src_len); memcpy(&cmd.dst_addr, dst_addr, dst_len); cmd.dst_size = dst_len; cmd.timeout_ms = timeout_ms;