ITS#7359 cleanup for loop

This commit is contained in:
Howard Chu 2012-08-22 14:13:10 -07:00
parent 6833b8717a
commit 1ebf95c31b

View File

@ -1010,12 +1010,12 @@ tlsm_find_unlocked_key( tlsm_ctx *ctx, void *pin_arg )
}
PK11SlotListElement *le;
for ( le = slots->head; le && !result; le = le->next ) {
for ( le = slots->head; le; le = le->next ) {
PK11SlotInfo *slot = le->slot;
if ( !PK11_IsLoggedIn( slot, NULL ) )
continue;
result = PK11_FindKeyByDERCert( slot, ctx->tc_certificate, pin_arg );
if ( PK11_IsLoggedIn( slot, NULL ) ) {
result = PK11_FindKeyByDERCert( slot, ctx->tc_certificate, pin_arg );
break;
}
}
PK11_FreeSlotList( slots );