This reworks a loop to get rid of an ugly pointer cast, fixing errors seen with the PathScale ENZO compiler. Signed-off-by: Mans Rullgard <mans@mansr.com>