Refactor rshift

It is unecessary to assign val.