Although it it's s side comment I´ll be first stateing that I prefer one exit for any method.
One major pro tof his construction is the possiblity to only have the need for a error-logging statement at one place.
Also it's very easy to add tracing logs for debugging porpose.
So following this idea I'd propose the following
#define OK (0)
int mid_level_func(....)
{
log_entry(...);
int rc = OK
{
...
if ((rc = low_level_func1(...)))
goto lblExit;
...
if ((rc = low_level_func2(...)))
goto lblExit;
...
lblExit:
;
}
if (OK != rc)
log_error(rc, ...);
log_exit(...);
return rc;
}
For the ones that insist on goto
being 'evil' the following variation on the scheme above might help:
#define OK (0)
int mid_level_func(....)
{
log_entry(...);
int rc = OK
do
{
...
if ((rc = low_level_func1(...)))
break;
...
if ((rc = low_level_func2(...)))
break;
...
} while (0);
if (OK != rc)
log_error(rc, ...);
log_exit(...);
return rc;
}