File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ int VerifyCC::luhnVerify(const char *ccnumber, int len) {
59
59
int sum[2 ] = { 0 , 0 };
60
60
int odd = 0 ;
61
61
int digits = 0 ;
62
- int i;
63
62
64
63
/* Weighted lookup table which is just a precalculated (i = index):
65
64
* i*2 + (( (i*2) > 9 ) ? -9 : 0)
@@ -71,7 +70,7 @@ int VerifyCC::luhnVerify(const char *ccnumber, int len) {
71
70
/* Add up only digits (weighted digits via lookup table)
72
71
* for both odd and even CC numbers to avoid 2 passes.
73
72
*/
74
- for (i = 0 ; i < len; i++) {
73
+ for (int i = 0 ;i < len;i++) {
75
74
if (ccnumber[i] >= (0 + 48 ) && ccnumber[i] <= (9 + 48 )) {
76
75
sum[0 ] += (!odd ? wtable[ccnumber[i] - ' 0' ] : (ccnumber[i] - ' 0' ));
77
76
sum[1 ] += (odd ? wtable[ccnumber[i] - ' 0' ] : (ccnumber[i] - ' 0' ));
You can’t perform that action at this time.
0 commit comments