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:
Viktor Tarasov 2013-01-04 19:03:46 +01:00
parent cc5a171ddc
commit 250364c060
2 changed files with 0 additions and 4 deletions

View File

@ -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)

View File

@ -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)