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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1322783915-19570-1-git-send-email-marcos.mage@gmail.com>
Date:	Thu,  1 Dec 2011 23:58:35 +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>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Greg Kroah-Hartman <gregkh@...se.de>,
	Forest Bond <forest@...ttletooquiet.net>,
	devel@...verdev.osuosl.org
Subject: [PATCH 1/5] staging: vt6656: datarate.c: Use memset instead a for loop

As Dan Carpenteder suggested, this makes the atribution more simple.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@...il.com>
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Greg Kroah-Hartman <gregkh@...se.de>
Cc: Forest Bond <forest@...ttletooquiet.net>
Cc: devel@...verdev.osuosl.org
---
 drivers/staging/vt6656/datarate.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6656/datarate.c b/drivers/staging/vt6656/datarate.c
index 5c2719f..58ca0d4 100644
--- a/drivers/staging/vt6656/datarate.c
+++ b/drivers/staging/vt6656/datarate.c
@@ -69,13 +69,8 @@ void s_vResetCounter(PKnownNodeDB psNodeDBTable);
 
 void s_vResetCounter(PKnownNodeDB psNodeDBTable)
 {
-    BYTE            ii;
-
-    // clear statistic counter for auto_rate
-    for (ii = 0; ii <= MAX_RATE; ii++) {
-        psNodeDBTable->uTxOk[ii] = 0;
-        psNodeDBTable->uTxFail[ii] = 0;
-    }
+	memset(psNodeDBTable->uTxOk, 0, sizeof(psNodeDBTable->uTxOk));
+	memset(psNodeDBTable->uTxFail, 0, sizeof(psNodeDBTable->uTxFail));
 }
 
 /*---------------------  Export Variables  --------------------------*/
-- 
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