If this code needs to grow much more, it might be better to
make it table-driven:
i = 0;
do {
static int (*funcs[])() = { func1, ..., 0 };
int (*fp)() = funcs;
do
ret[i] = (*fp)( args );
while ( ret[i] == GOOD && *++fp );
}
while ( ret[i] == GOOD && ++i < MAX_RETS );
This example isn't precisely equivalent to the original, but
it accomplishes the same general goal.