Skip to content

linux_nfc_api.cpp: fix compiler error#150

Open
hthiery wants to merge 1 commit intoNXPNFCLinux:NCI2.0_PN7160from
hthiery:NCI2.0_PN7160
Open

linux_nfc_api.cpp: fix compiler error#150
hthiery wants to merge 1 commit intoNXPNFCLinux:NCI2.0_PN7160from
hthiery:NCI2.0_PN7160

Conversation

@hthiery
Copy link
Copy Markdown

@hthiery hthiery commented Dec 12, 2022

src/service/linux_nfc_api.cpp: In function ‘int doReadT4tData(unsigned char*, unsigned char*, int*)’: src/service/linux_nfc_api.cpp:382:51: error: ordered comparison of pointer with integer zero (‘int*’ and ‘int’)
382 | if (ndef_buffer == NULL || ndef_buffer_length <= 0) {

Signed-off-by: Heiko Thiery heiko.thiery@gmail.com

src/service/linux_nfc_api.cpp: In function ‘int doReadT4tData(unsigned char*, unsigned char*, int*)’:
src/service/linux_nfc_api.cpp:382:51: error: ordered comparison of pointer with integer zero (‘int*’ and ‘int’)
  382 |     if (ndef_buffer == NULL || ndef_buffer_length <= 0) {

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
@mlupur
Copy link
Copy Markdown

mlupur commented Dec 12, 2022

Since ndef_buffer_length is a pointer, would it make sense to check first if it is NULL, before dereferencing it?

@aleksas
Copy link
Copy Markdown

aleksas commented Jun 2, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants