if (cpw->vp_length != 68) {
REDEBUG("MS-CHAP2-CPW has the wrong format: length %zu != 68", cpw->vp_length);
return RLM_MODULE_INVALID;
- } else if (cpw->vp_octets[0]!=7) {
+ }
+
+ if (cpw->vp_octets[0] != 7) {
REDEBUG("MS-CHAP2-CPW has the wrong format: code %d != 7", cpw->vp_octets[0]);
return RLM_MODULE_INVALID;
}
REDEBUG("MS-CHAP-NT-Enc-PW with invalid format");
return RLM_MODULE_INVALID;
}
- if (nt_enc->vp_octets[2]==0 && nt_enc->vp_octets[3]==seq) {
+
+ if ((nt_enc->vp_octets[2] == 0) && (nt_enc->vp_octets[3] == seq)) {
found = 1;
break;
}
return RLM_MODULE_INVALID;
}
- if ((new_nt_enc_len + nt_enc->vp_length - 4)>= sizeof(new_nt_encrypted)) {
+ if ((new_nt_enc_len + nt_enc->vp_length - 4) >= sizeof(new_nt_encrypted)) {
REDEBUG("Unpacked MS-CHAP-NT-Enc-PW length > 516");
return RLM_MODULE_INVALID;
}