Skip to content

Commit

Permalink
debug: fix Available profiles output
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Wernli <[email protected]>
  • Loading branch information
Florian Wernli authored and simo5 committed Mar 6, 2024
1 parent e08ab2b commit 59b0aba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ void p11prov_debug_slot(P11PROV_CTX *ctx, CK_SLOT_ID slotid, CK_SLOT_INFO *slot,

if (profiles[0] != CKP_INVALID_ID) {
p11prov_debug(NULL, 0, NULL, " Available profiles:\n");
for (int c = 0; c < 5; c++) {
for (int c = 0; c < 5 && profiles[c] != CKP_INVALID_ID; c++) {
for (int i = 0; profile_ids[i].name != NULL; i++) {
if (profiles[c] == slot_flags[i].value) {
if (profiles[c] == profile_ids[i].value) {
p11prov_debug(NULL, 0, NULL, " %-35s (%#08lx)",
profile_ids[i].name, profile_ids[i].value);
}
Expand Down

0 comments on commit 59b0aba

Please sign in to comment.