lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1322784109-19807-1-git-send-email-marcos.mage@gmail.com>
Date:	Fri,  2 Dec 2011 00:01:49 +0000
From:	Marcos Paulo de Souza <marcos.mage@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Marcos Paulo de Souza <marcos.mage@...il.com>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Forest Bond <forest@...ttletooquiet.net>,
	devel@...verdev.osuosl.org
Subject: [PATCH 3/5] staging: vt6656: channel.c: Rewrite ChannelValid function

This patch simplifies the code of ChannelValid fucntion.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...e.de>
Cc: Forest Bond <forest@...ttletooquiet.net>
Cc: devel@...verdev.osuosl.org
---
 drivers/staging/vt6656/channel.c |   25 ++++++++-----------------
 1 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c
index 99e054d..954aee7 100644
--- a/drivers/staging/vt6656/channel.c
+++ b/drivers/staging/vt6656/channel.c
@@ -392,25 +392,16 @@ static  struct
 BOOL
 ChannelValid(unsigned int CountryCode, unsigned int ChannelIndex)
 {
-    BOOL    bValid;
+	/*
+	 * If Channel Index is invalid, return invalid
+	 */
+	if ((ChannelIndex > CB_MAX_CHANNEL) ||
+	    (ChannelIndex == 0))
+		return FALSE;
 
-    bValid = FALSE;
-    /*
-     * If Channel Index is invalid, return invalid
-     */
-    if ((ChannelIndex > CB_MAX_CHANNEL) ||
-        (ChannelIndex == 0))
-    {
-        bValid = FALSE;
-        goto exit;
-    }
-
-    bValid = sChannelTbl[ChannelIndex].bValid;
+	return sChannelTbl[ChannelIndex].bValid;
 
-exit:
-    return (bValid);
-
-} /* end ChannelValid */
+}
 
 /************************************************************************
  * CHvChannelGetList
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ