Skip to content

Commit ef1b05e

Browse files
authored
Refactor condition to simplify reader check
1 parent ca88fcd commit ef1b05e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

driver/apdu/pcsc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ static int pcsc_open_hCard_iter(struct pcsc_userdata *userdata, const int index,
118118
const int id = getenv_or_default(ENV_DRV_IFID, (int)-1);
119119
if (id != -1 && id != index) {
120120
const char *part_name = getenv(ENV_DRV_NAME);
121-
if (part_name != NULL && strstr(reader, part_name) != NULL) {
122-
// pass
123-
} else {
121+
if (part_name == NULL || strstr(reader, part_name) == NULL) {
124122
return 0;
125123
}
126124
}

0 commit comments

Comments
 (0)