HomeFreeBSD

ng_tty: avoid the sign extention of char

Description

ng_tty: avoid the sign extention of char

When c is compared to sc->hotchar, both undergo integer promotion, which
can lead to c being sign extended. Fix this by casting c to an unsigned
char.

Reviewed by: kevans
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54544

(cherry picked from commit 9b2478f60bfda663c84b48e272a2293159e1b0a0)

Details

Provenance
vexeduxrAuthored on Jan 6 2026, 2:07 AM
Reviewer
kevans
Differential Revision
D54544: ng_tty: avoid the sign extention of char
Parents
rG618cf02ffc52: libgeom: Fix 32-bit gcc build
Branches
Unknown
Tags
Unknown