Am Montag, den 02.10.2006, 22:39 +0200 schrieb Ruediger Pluem:
> if (((rc = apr_procattr_create(&procattr, p)) == APR_SUCCESS)
>         && ((rc = apr_procattr_cmdtype_set(procattr,
>                                            APR_SHELLCMD_ENV)) == APR_SUCCESS)
>         && ((rc = apr_procattr_io_set(procattr,
>                                       APR_FULL_BLOCK,
>                                       APR_NO_PIPE,
>                                       APR_NO_PIPE)) == APR_SUCCESS)
>         && ((rc = apr_procattr_error_check_set(procattr, 1)) == APR_SUCCESS)
>         && ((rc = apr_procattr_child_errfn_set(procattr, log_child_errfn)) == 
> APR_SUCCESS)) {
> 
> To get the same thing with above style you would create a lot
> of nested if statements or you would have to use a lot of if statements and 
> goto.

I would put this in a seperate function where it turns into the easy to
read classic, that returns after any unsuccessfull call. These returns
are hidden gotos, of course.

Sincerely,
Joachim


Reply via email to