Fix mifare_desfire_get_[iso_]file_ids() prototype.
The "files" parameter is not an array of pointer to uint8_t (uint8_t *files[]), but rather an pointer to an array of uint8_t (uint8_t (*files)[]). Since this syntax confuses the compiler (the program attempt to assign a value to what "files" is pointing to, which is supposed to be an array, which is not assignable), declare "files" as a pointer to a pointer to uint8_t (uint8_t **files) which makes everybody happy. Fixes issue 26.
This commit is contained in:
parent
27d33775dc
commit
ffde4d4d92
2 changed files with 4 additions and 4 deletions
|
@ -354,8 +354,8 @@ int mifare_desfire_set_configuration (MifareTag tag, bool disable_format, bool
|
||||||
int mifare_desfire_set_default_key (MifareTag tag, MifareDESFireKey key);
|
int mifare_desfire_set_default_key (MifareTag tag, MifareDESFireKey key);
|
||||||
int mifare_desfire_set_ats (MifareTag tag, uint8_t *ats);
|
int mifare_desfire_set_ats (MifareTag tag, uint8_t *ats);
|
||||||
int mifare_desfire_get_card_uid (MifareTag tag, char **uid);
|
int mifare_desfire_get_card_uid (MifareTag tag, char **uid);
|
||||||
int mifare_desfire_get_file_ids (MifareTag tag, uint8_t *files[], size_t *count);
|
int mifare_desfire_get_file_ids (MifareTag tag, uint8_t **files, size_t *count);
|
||||||
int mifare_desfire_get_iso_file_ids (MifareTag tag, uint16_t *files[], size_t *count);
|
int mifare_desfire_get_iso_file_ids (MifareTag tag, uint16_t **files, size_t *count);
|
||||||
int mifare_desfire_get_file_settings (MifareTag tag, uint8_t file_no, struct mifare_desfire_file_settings *settings);
|
int mifare_desfire_get_file_settings (MifareTag tag, uint8_t file_no, struct mifare_desfire_file_settings *settings);
|
||||||
int mifare_desfire_change_file_settings (MifareTag tag, uint8_t file_no, uint8_t communication_settings, uint16_t access_rights);
|
int mifare_desfire_change_file_settings (MifareTag tag, uint8_t file_no, uint8_t communication_settings, uint16_t access_rights);
|
||||||
int mifare_desfire_create_std_data_file (MifareTag tag, uint8_t file_no, uint8_t communication_settings, uint16_t access_rights, uint32_t file_size);
|
int mifare_desfire_create_std_data_file (MifareTag tag, uint8_t file_no, uint8_t communication_settings, uint16_t access_rights, uint32_t file_size);
|
||||||
|
|
|
@ -1160,7 +1160,7 @@ mifare_desfire_get_card_uid (MifareTag tag, char **uid)
|
||||||
/* Application level commands */
|
/* Application level commands */
|
||||||
|
|
||||||
int
|
int
|
||||||
mifare_desfire_get_file_ids (MifareTag tag, uint8_t *files[], size_t *count)
|
mifare_desfire_get_file_ids (MifareTag tag, uint8_t **files, size_t *count)
|
||||||
{
|
{
|
||||||
ASSERT_ACTIVE (tag);
|
ASSERT_ACTIVE (tag);
|
||||||
ASSERT_MIFARE_DESFIRE (tag);
|
ASSERT_MIFARE_DESFIRE (tag);
|
||||||
|
@ -1193,7 +1193,7 @@ mifare_desfire_get_file_ids (MifareTag tag, uint8_t *files[], size_t *count)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
mifare_desfire_get_iso_file_ids (MifareTag tag, uint16_t *files[], size_t *count)
|
mifare_desfire_get_iso_file_ids (MifareTag tag, uint16_t **files, size_t *count)
|
||||||
{
|
{
|
||||||
ASSERT_ACTIVE (tag);
|
ASSERT_ACTIVE (tag);
|
||||||
ASSERT_MIFARE_DESFIRE (tag);
|
ASSERT_MIFARE_DESFIRE (tag);
|
||||||
|
|
Loading…
Add table
Reference in a new issue