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)); } regards, dan carpenter
Attachment:
signature.asc
Description: Digital signature
_______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel