From patchwork Mon Mar 26 20:57:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Wise X-Patchwork-Id: 10308725 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 1A375605D2 for ; Mon, 26 Mar 2018 21:22:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B5BE2022B for ; Mon, 26 Mar 2018 21:22:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F40EF21327; Mon, 26 Mar 2018 21:22:51 +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 765202022B for ; Mon, 26 Mar 2018 21:22:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752124AbeCZVWo (ORCPT ); Mon, 26 Mar 2018 17:22:44 -0400 Received: from opengridcomputing.com ([70.118.0.34]:49907 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752348AbeCZVWi (ORCPT ); Mon, 26 Mar 2018 17:22:38 -0400 Received: by smtp.opengridcomputing.com (Postfix, from userid 503) id B02EA2B8D7; Mon, 26 Mar 2018 16:22:37 -0500 (CDT) Message-Id: <2de3f506d81317bab93103874147c5eb90b56798.1522097991.git.swise@opengridcomputing.com> In-Reply-To: References: From: Steve Wise Date: Mon, 26 Mar 2018 13:57:36 -0700 Subject: [PATCH v3 iproute2-next 4/8] 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;