[PATCH 3/4] staging: vt6656: datarate.c: Remove unneeded comments
Marcos Paulo de Souza
marcos.mage at gmail.com
Thu Dec 1 18:56:50 UTC 2011
On Thu, 1 Dec 2011, Dan Carpenter wrote:
> On Thu, Dec 01, 2011 at 12:31:57AM +0000, Marcos Paulo de Souza wrote:
>> - // clear statistic counter for auto_rate
>> - for (ii = 0; ii <= MAX_RATE; ii++) {
>> - psNodeDBTable->uTxOk[ii] = 0;
>> - psNodeDBTable->uTxFail[ii] = 0;
>> - }
>> + /* clear statistic counter for auto_rate */
>> + for (ii = 0; ii <= MAX_RATE; ii++)
>> + psNodeDBTable->uTxOk[ii] = psNodeDBTable->uTxFail[ii] = 0;
>> }
>>
>
> Don't do that... Better to have the assignments on separate lines.
>
> If you wanted, you could use memset and get rid of the loop.
>
> void s_vResetCounter(PKnownNodeDB psNodeDBTable)
> {
> memset(psNodeDBTable->uTxOk, 0, sizeof(psNodeDBTable->uTxOk));
> memset(psNodeDBTable->uTxFail, 0, sizeof(psNodeDBTable->uTxFail));
> }
OK, I will send this patch again.
Thanks for your suggestion.
> regards,
> dan carpenter
>
More information about the devel
mailing list