Simplify code in CHERI memaccess