aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2017-07-22 09:50:22 +0200
committerMarcel Holtmann <marcel@holtmann.org>2017-07-22 09:50:22 +0200
commit8ec0bd04cb46dae188e2bbb131fea0253b768277 (patch)
tree4c258901d6072744cc500b05ce8ef319498fa26e
parent42de038fea49ae15d2d3646416c73befaddbbfaf (diff)
downloadneard-8ec0bd04cb46dae188e2bbb131fea0253b768277.tar.gz
nfctype2: Use explicit comparison to zero to make it clearer
plugins/nfctype2.c:68:38: error: ‘*’ in boolean context, suggest ‘&&’ instead [-Werror=int-in-bool-context] #define TAG_DATA_LENGTH(cc) ((cc)[2] * 8) ~~~~~~~~~^~~~ plugins/nfctype2.c:245:11: note: in expansion of macro ‘TAG_DATA_LENGTH’ NULL, (TAG_DATA_LENGTH(cc) ? TAG_DATA_LENGTH(cc) : ^~~~~~~~~~~~~~~
-rw-r--r--plugins/nfctype2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/nfctype2.c b/plugins/nfctype2.c
index 559ecb0..6cb3daa 100644
--- a/plugins/nfctype2.c
+++ b/plugins/nfctype2.c
@@ -242,7 +242,7 @@ static int meta_recv(uint8_t *resp, int length, void *data)
/* Default to 48 bytes data size in case of blank tag */
err = near_tag_add_data(cookie->adapter_idx, cookie->target_idx,
- NULL, (TAG_DATA_LENGTH(cc) ? TAG_DATA_LENGTH(cc) :
+ NULL, (TAG_DATA_LENGTH(cc) != 0 ? TAG_DATA_LENGTH(cc) :
TYPE2_DATA_SIZE_48 << 3));
if (err < 0)