From patchwork Tue Oct 9 12:27:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dotan Barak X-Patchwork-Id: 1569961 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EFEAFDFFAD for ; Tue, 9 Oct 2012 12:43:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754349Ab2JIMnc (ORCPT ); Tue, 9 Oct 2012 08:43:32 -0400 Received: from eu1sys200aog116.obsmtp.com ([207.126.144.141]:55320 "HELO eu1sys200aog116.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752970Ab2JIMnb (ORCPT ); Tue, 9 Oct 2012 08:43:31 -0400 Received: from mtlsws123.lab.mtl.com ([82.166.227.17]) (using TLSv1) by eu1sys200aob116.postini.com ([207.126.147.11]) with SMTP ID DSNKUHQb8XuNsAqU2mXCnr5QHHoZl+8k6dxY@postini.com; Tue, 09 Oct 2012 12:43:31 UTC Received: from swl021.lab.mtl.com (swl021.lab.mtl.com [10.7.17.21]) by mtlsws123.lab.mtl.com (8.13.8/8.13.8) with ESMTP id q99CRs4v004798; Tue, 9 Oct 2012 14:27:54 +0200 From: Dotan Barak To: sean.hefty@intel.com Cc: linux-rdma@vger.kernel.org, Dotan Barak Subject: [PATCH 3/5] [librdmacm] rstream: initialize return value in server_connect() Date: Tue, 9 Oct 2012 14:27:50 +0200 Message-Id: <1349785672-1921-4-git-send-email-dotanb@dev.mellanox.co.il> X-Mailer: git-send-email 1.7.8.2 In-Reply-To: <1349785672-1921-1-git-send-email-dotanb@dev.mellanox.co.il> References: <1349785672-1921-1-git-send-email-dotanb@dev.mellanox.co.il> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org If use_async == 0 and rs_accept() passes (i.e. non negative value), then the return value from the function was uninitialized. Signed-off-by: Dotan Barak Reviewed-by: Yishai Hadas --- examples/rstream.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/examples/rstream.c b/examples/rstream.c index 1d221d0..6ef60a1 100644 --- a/examples/rstream.c +++ b/examples/rstream.c @@ -444,7 +444,7 @@ free: static int server_connect(void) { struct pollfd fds; - int ret; + int ret = 0; set_options(lrs); do {