pkcs15init: fix spurious gcc overflow warning,
thanks to Milan Broz (mbroz@redhat.com) As discussed in pull request #115 (https://github.com/OpenSC/OpenSC/pull/115), 'if' test of impossible condition is removed in 'cardos' and 'incypto34' card drivers.
This commit is contained in:
parent
cc5a171ddc
commit
250364c060
|
@ -170,8 +170,6 @@ cardos_select_pin_reference(sc_profile_t *profile, sc_pkcs15_card_t *p15card,
|
|||
/* PINs are even numbered, PUKs are odd */
|
||||
if (!(preferred & 1))
|
||||
preferred++;
|
||||
if (preferred >= 126)
|
||||
return SC_ERROR_TOO_MANY_OBJECTS;
|
||||
}
|
||||
|
||||
if (current > preferred || preferred > CARDOS_PIN_ID_MAX)
|
||||
|
|
|
@ -189,8 +189,6 @@ incrypto34_select_pin_reference(sc_profile_t *profile, sc_pkcs15_card_t *p15card
|
|||
/* PINs are even numbered, PUKs are odd */
|
||||
if (!(preferred & 1))
|
||||
preferred++;
|
||||
if (preferred >= 126)
|
||||
return SC_ERROR_TOO_MANY_OBJECTS;
|
||||
}
|
||||
|
||||
if (current > preferred || preferred > INCRYPTO34_PIN_ID_MAX)
|
||||
|
|
Loading…
Reference in New Issue