From patchwork Thu Nov 29 19:58:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schmidt X-Patchwork-Id: 10705265 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 68B5013AD for ; Thu, 29 Nov 2018 19:58:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 590042F971 for ; Thu, 29 Nov 2018 19:58:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48EE72F981; Thu, 29 Nov 2018 19:58:27 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 AD6562F971 for ; Thu, 29 Nov 2018 19:58:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726456AbeK3HFA (ORCPT ); Fri, 30 Nov 2018 02:05:00 -0500 Received: from proxima.lasnet.de ([78.47.171.185]:44409 "EHLO proxima.lasnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725788AbeK3HFA (ORCPT ); Fri, 30 Nov 2018 02:05:00 -0500 Received: from localhost.localdomain (p200300E9D7231C6C11666C2475ED8FA6.dip0.t-ipconnect.de [IPv6:2003:e9:d723:1c6c:1166:6c24:75ed:8fa6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan@sostec.de) by proxima.lasnet.de (Postfix) with ESMTPSA id 11123C8BFE; Thu, 29 Nov 2018 20:58:23 +0100 (CET) From: Stefan Schmidt To: linux-wpan@vger.kernel.org Cc: aring@mojatatu.com, Stefan Schmidt Subject: [PATCH wpan-tools] hwsim: make sure lqi is always initialized Date: Thu, 29 Nov 2018 20:58:00 +0100 Message-Id: <20181129195800.28483-1-stefan@datenfreihafen.org> X-Mailer: git-send-email 2.17.2 Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The lqi variable was not initialized in all code paths. CID: 185497 Signed-off-by: Stefan Schmidt --- wpan-hwsim/wpan-hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpan-hwsim/wpan-hwsim.c b/wpan-hwsim/wpan-hwsim.c index 3e54348..0a7c492 100644 --- a/wpan-hwsim/wpan-hwsim.c +++ b/wpan-hwsim/wpan-hwsim.c @@ -382,7 +382,7 @@ static void print_version(void) int main(int argc, const char *argv[]) { - unsigned long int idx, idx2, lqi, ignore_idx = ULONG_MAX; + unsigned long int idx, idx2, lqi = 0, ignore_idx = ULONG_MAX; bool dot = false; int cmd; int rc;