Reformat do_castling()

No functional change.