295e4149b0
ahd_inb() returns type uint8_t. The shift left by untyped 24 implicitly promotes the result to type (signed) int. Then the binary OR with uint64_t values sign-extends the integer. If bit 31 of the read value happened to be set, the 64-bit result would have all upper 32 bits set to 1 due to OR. This is clearly not intended. Reported by: Coverity CID: 980473 (old one!)