board: dhelectronics: Use isascii() before isprint() in dh_read_eeprom_id_page()
authorMarek Vasut <marek.vasut@mailbox.org>
Sun, 7 Sep 2025 01:00:47 +0000 (03:00 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 16 Sep 2025 22:14:18 +0000 (16:14 -0600)
commitfd396316432ad4a0f2998ea9eee9720be0e5d5f8
tree7e37ee66622ce0e1cfa8dd4643e6b12f32d1f0c8
parent1c735620e19e2ae07705cc38da1552ee6a696ff0
board: dhelectronics: Use isascii() before isprint() in dh_read_eeprom_id_page()

The isprint() checks printability across all 256 characters, some of the
upper 128 characters are printable and produce artifacts on UART. Call
isascii() first to only consider the bottom 7bit ASCII characters as
printable, and then check their printability using isprint(). This fixes
a rare misprint in case the ID page content is uninitialized or corrupted.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
board/dhelectronics/common/dh_common.c