sh: Eliminate some gotos.