Use a variable that makes slightly better sense. Specifically, in code that looks like ...compute i... vn = i; switch (...) { ... ...malloc(i)... ...malloc(i*...)... ...code that uses i as a temporary... use vn rather than i in the malloc calls. The value is the same, but vn makes slightly better sense semantically.