Move `updateEvent`'s declaration above its first use.