From patchwork Thu Mar 29 16:10:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Wise X-Patchwork-Id: 10316415 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 5BBB76037E for ; Thu, 29 Mar 2018 21:44:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B7202A4CF for ; Thu, 29 Mar 2018 21:44:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3008F2A519; Thu, 29 Mar 2018 21:44:01 +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=-5.3 required=2.0 tests=BAYES_00, DATE_IN_PAST_03_06, RCVD_IN_DNSWL_HI 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 A58392A4CF for ; Thu, 29 Mar 2018 21:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752338AbeC2Vnx (ORCPT ); Thu, 29 Mar 2018 17:43:53 -0400 Received: from opengridcomputing.com ([70.118.0.34]:50413 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752326AbeC2Vnw (ORCPT ); Thu, 29 Mar 2018 17:43:52 -0400 Received: by smtp.opengridcomputing.com (Postfix, from userid 503) id ACC702BC23; Thu, 29 Mar 2018 16:43:51 -0500 (CDT) Message-Id: <0459489667e983bb3a6f9ecaf25daff6a329f2da.1522359537.git.swise@opengridcomputing.com> In-Reply-To: References: From: Steve Wise Date: Thu, 29 Mar 2018 09:10:35 -0700 Subject: [PATCH v4 iproute2-next 3/7] rdma: initialize the rd struct To: dsahern@gmail.com Cc: leon@kernel.org, stephen@networkplumber.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org 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 Initialize the rd struct so port_idx is 0 unless set otherwise. Otherwise, strict_port queries end up passing an uninitialized PORT nlattr. Signed-off-by: Steve Wise Reviewed-by: Leon Romanovsky --- rdma/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdma/rdma.c b/rdma/rdma.c index ab2c960..b43e538 100644 --- a/rdma/rdma.c +++ b/rdma/rdma.c @@ -135,7 +135,7 @@ int main(int argc, char **argv) bool json_output = false; bool force = false; char *filename; - struct rd rd; + struct rd rd = {}; int opt; int err;