[PATCH 3/4] pacdiff: Reduce repetition in input loop