From patchwork Tue Feb 27 16:07:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Wise X-Patchwork-Id: 10255661 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 A539C6037D for ; Fri, 2 Mar 2018 20:10:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98933284D2 for ; Fri, 2 Mar 2018 20:10:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9720328518; Fri, 2 Mar 2018 20:10:43 +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 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 2E82728538 for ; Fri, 2 Mar 2018 20:10:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932626AbeCBUKh (ORCPT ); Fri, 2 Mar 2018 15:10:37 -0500 Received: from opengridcomputing.com ([70.118.0.34]:60317 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932619AbeCBUKg (ORCPT ); Fri, 2 Mar 2018 15:10:36 -0500 Received: by smtp.opengridcomputing.com (Postfix, from userid 503) id 8110D2BC80; Fri, 2 Mar 2018 14:10:35 -0600 (CST) Message-Id: <0ba0136867d1d296e4d1855cac322fdd88025ce3.1520020530.git.swise@opengridcomputing.com> In-Reply-To: References: From: Steve Wise Date: Tue, 27 Feb 2018 08:07:00 -0800 Subject: [PATCH v2 iproute2-next 2/6] 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 19608f4..c652550 100644 --- a/rdma/rdma.c +++ b/rdma/rdma.c @@ -93,7 +93,7 @@ int main(int argc, char **argv) bool show_details = false; bool json_output = false; char *filename; - struct rd rd; + struct rd rd = {}; int opt; int err;