Skip to content

linux_nfc_api.cpp: fix compiler error#150

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

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

Conversation

@hthiery

@hthiery hthiery commented Dec 12, 2022

Copy link
Copy Markdown

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

mlupur commented Dec 12, 2022

Copy link
Copy Markdown

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

@aleksas

aleksas commented Jun 2, 2023

Copy link
Copy Markdown

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