Mark atr table argument as const in match_atr_table and _sc_match_atr functions
This allows us to mark driver-specific atr tables as constants.
This commit is contained in:
parent
fcd719d30f
commit
2eae5e70f5
|
@ -1070,7 +1070,7 @@ sc_algorithm_info_t * sc_card_find_gostr3410_alg(sc_card_t *card,
|
||||||
return sc_card_find_alg(card, SC_ALGORITHM_GOSTR3410, key_length, NULL);
|
return sc_card_find_alg(card, SC_ALGORITHM_GOSTR3410, key_length, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int match_atr_table(sc_context_t *ctx, struct sc_atr_table *table, struct sc_atr *atr)
|
static int match_atr_table(sc_context_t *ctx, const struct sc_atr_table *table, struct sc_atr *atr)
|
||||||
{
|
{
|
||||||
u8 *card_atr_bin;
|
u8 *card_atr_bin;
|
||||||
size_t card_atr_bin_len;
|
size_t card_atr_bin_len;
|
||||||
|
@ -1133,7 +1133,7 @@ static int match_atr_table(sc_context_t *ctx, struct sc_atr_table *table, struct
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _sc_match_atr(sc_card_t *card, struct sc_atr_table *table, int *type_out)
|
int _sc_match_atr(sc_card_t *card, const struct sc_atr_table *table, int *type_out)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ scconf_block *_sc_match_atr_block(sc_context_t *ctx, struct sc_card_driver *driv
|
||||||
|
|
||||||
/* Returns an index number if a match was found, -1 otherwise. table has to
|
/* Returns an index number if a match was found, -1 otherwise. table has to
|
||||||
* be null terminated. */
|
* be null terminated. */
|
||||||
int _sc_match_atr(struct sc_card *card, struct sc_atr_table *table, int *type_out);
|
int _sc_match_atr(struct sc_card *card, const struct sc_atr_table *table, int *type_out);
|
||||||
|
|
||||||
int _sc_card_add_algorithm(struct sc_card *card, const struct sc_algorithm_info *info);
|
int _sc_card_add_algorithm(struct sc_card *card, const struct sc_algorithm_info *info);
|
||||||
int _sc_card_add_symmetric_alg(sc_card_t *card, unsigned int algorithm,
|
int _sc_card_add_symmetric_alg(sc_card_t *card, unsigned int algorithm,
|
||||||
|
|
Loading…
Reference in New Issue