Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux_nfc_api.cpp: fix compiler error #150

Open
wants to merge 1 commit into
base: NCI2.0_PN7160
Choose a base branch
from

Conversation

hthiery
Copy link

@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

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

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
3 participants