staging: vt6656: datarate.c: Use memset instead a for loop
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 <[email protected]>
Signed-off-by Dan Carpenter <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Forest Bond <[email protected]>
--- drivers/staging/vt6656/datarate.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-)
drivers/staging/vt6656/datarate.c +2 -7
@@ -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 --------------------------*/
Signature · 1 line
1.7.4.4
Quoted 4 lines · Marcos Paulo de Souza
As Dan Carpenteder suggested, this makes the atribution more simple.
Signed-off-by Marcos Paulo de Souza <[email protected]>Signed-off-by Dan Carpenter <[email protected]>
Normally I wouldn't get the Signed-off-by line here. People can only can sign things for themselves, but in this case it's fine, whatever.
Reviewed-by Dan Carpenter <[email protected]>
regards,
dan carpenter