diff --git a/src/encauth/ccm/ccm_process.c b/src/encauth/ccm/ccm_process.c index 2446f28..8346d22 100644 --- a/src/encauth/ccm/ccm_process.c +++ b/src/encauth/ccm/ccm_process.c @@ -24,7 +24,8 @@ int ccm_process(ccm_state *ccm, unsigned char *ct, int direction) { - unsigned char y, z, b; + unsigned char z, b; + unsigned long y; int err; LTC_ARGCHK(ccm != NULL); @@ -44,9 +45,8 @@ int ccm_process(ccm_state *ccm, if (ptlen > 0) { LTC_ARGCHK(pt != NULL); LTC_ARGCHK(ct != NULL); - y = 0; - for (; y < ptlen; y++) { + for (y = 0; y < ptlen; y++) { /* increment the ctr? */ if (ccm->CTRlen == 16) { for (z = 15; z > 15-ccm->L; z--) {