From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuval Shaia Subject: Re: [PATCH rdma-core] librdmacm: Remove unneeded condition Date: Thu, 2 Nov 2017 20:03:17 +0200 Message-ID: <20171102180316.GB7833@yuvallap> References: <20171102135134.5728-1-yuval.shaia@oracle.com> <20171102151252.GY16127@mtr-leonro.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20171102151252.GY16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Leon Romanovsky Cc: sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-rdma@vger.kernel.org On Thu, Nov 02, 2017 at 05:12:52PM +0200, Leon Romanovsky wrote: > On Thu, Nov 02, 2017 at 03:51:34PM +0200, Yuval Shaia wrote: > > 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)) > > Isn't this "=" should be "=="? No chance as cmd was just initialized. > > > - 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; > > -- > > 2.13.6 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html