Fix warning about incompatible types
pn53x.c:85:57: warning: Result of 'malloc' is converted to a pointer of type 'nfc_modulation_type', which is incompatible with sizeof operand type 'nfc_modulation' CHIP_DATA(pnd)->supported_modulation_as_initiator = malloc(sizeof(nfc_modulation) * 9); ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
ebe6335fc1
commit
cc7c0c32f1
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ pn53x_init(struct nfc_device *pnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CHIP_DATA(pnd)->supported_modulation_as_initiator) {
|
if (!CHIP_DATA(pnd)->supported_modulation_as_initiator) {
|
||||||
CHIP_DATA(pnd)->supported_modulation_as_initiator = malloc(sizeof(nfc_modulation) * 9);
|
CHIP_DATA(pnd)->supported_modulation_as_initiator = malloc(sizeof(nfc_modulation_type) * 9);
|
||||||
if (! CHIP_DATA(pnd)->supported_modulation_as_initiator)
|
if (! CHIP_DATA(pnd)->supported_modulation_as_initiator)
|
||||||
return NFC_ESOFT;
|
return NFC_ESOFT;
|
||||||
int nbSupportedModulation = 0;
|
int nbSupportedModulation = 0;
|
||||||
|
|
Loading…
Reference in a new issue