[PATCH 1/5] staging: vt6656: datarate.c: Use memset instead a for loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Marcos Paulo de Souza <marcos.mage@xxxxxxxxx>
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxx>
Cc: Forest Bond <forest@xxxxxxxxxxxxxxxxxxx>
Cc: devel@xxxxxxxxxxxxxxxxxxxx
---
 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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux