Don't hard-code 0x80 because there is a define for it. No functional change. Signed-off-by: Krzysztof Kozlowski --- src/ndef.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ndef.c b/src/ndef.c index 13e3356c2c4c..928e6a10a999 100644 --- a/src/ndef.c +++ b/src/ndef.c @@ -1164,8 +1164,8 @@ parse_text_payload(uint8_t *payload, uint32_t length) if (!text_payload) return NULL; - /* 0x80 is used to get 7th bit value (0th bit is LSB) */ - status = ((payload[offset] & 0x80) >> 7); + /* 0th bit is LSB */ + status = ((payload[offset] & NDEF_TEXT_RECORD_UTF16_STATUS) >> 7); text_payload->encoding = (status == 0) ? g_strdup("UTF-8") : g_strdup("UTF-16"); -- 2.27.0 _______________________________________________ Linux-nfc mailing list -- linux-nfc@lists.01.org To unsubscribe send an email to linux-nfc-leave@lists.01.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s