On Mon, Mar 11, 2002 at 03:33:55PM +0100, Sander Striker wrote:
>...
> >> server/mpm_common.c:442
> >> rv = apr_file_close(pod->pod_in);
> >> if (rv != APR_SUCCESS) {
> >> return rv;
> >> }
> >>
> >> return rv;
> >> }
> >>
> >> If we are going to waste the if, we might aswell return
> >> APR_SUCCESS, no?
Um. Way simpler than that:
return apr_file_close(pod->pod_in);
Forget the variable, forget the if, etc etc.
>...
> > as for this code, go for the APR_SUCCESS (you're left with a trade-off
> > between compactness vs. using a style that can be extended if more
> > work is added later)
Um. You're talking about a single line. Go for compact for readibility.
Should the day ever arrive to "extend", then it is a simple manipulation.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/