Remove temporary assignment of v = v + 1 and do it inline