Reformat and rename hash_after_move()

Align to standard coding style and properly use
enum types. Rename while there.

No functional change.
Merge branch 'master' into connected