Stefan Beller [off-list ref] writes:
And the parse_object_buffer looks like this with respect to the eaten
variable:
struct object *parse_object_buffer(...)
{
int eaten = 0;
if (something)
return NULL;
...
if (something_different)
eaten=1;
*eaten_p = eaten;
}
...
Was there a particular idea or goal behind first having a local eaten
variable, which later near the correct return of the function was used to set the
eaten_p?
I didn't run "blame" to see the evolution of this function, but I
suspect that the original code, when the "eaten" local variable was
introduced, very much tried to do exactly what you suspect. The
early return codepaths you see in today's code may be much newer,
added without much thinking about the exact issue you are bringing
up.