swrap: Fix the loop for older gcc versions.