]> granicus.if.org Git - apache/commitdiff
- style & readability
authorAndré Malo <nd@apache.org>
Mon, 28 Jul 2003 23:41:18 +0000 (23:41 +0000)
committerAndré Malo <nd@apache.org>
Mon, 28 Jul 2003 23:41:18 +0000 (23:41 +0000)
- procattr_cmd_type_set was called twice. shoot one.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100831 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_rewrite.c

index a2858b956313978340bc0607960ca2705d0cc526..54f3d13524a4f3b3c12eebc7ad8a4a78fb7d6b8b 100644 (file)
@@ -1083,8 +1083,7 @@ static char *select_random_value_part(request_rec *r, char *value)
 static void rewrite_child_errfn(apr_pool_t *p, apr_status_t err,
                                 const char *desc)
 {
-    ap_log_error(APLOG_MARK, APLOG_ERR, err, NULL,
-                 "%s", desc);
+    ap_log_error(APLOG_MARK, APLOG_ERR, err, NULL, "%s", desc);
 }
 
 static apr_status_t rewritemap_program_child(apr_pool_t *p,
@@ -1096,19 +1095,16 @@ static apr_status_t rewritemap_program_child(apr_pool_t *p,
     apr_procattr_t *procattr;
     apr_proc_t *procnew;
 
-    if (((rc = apr_procattr_create(&procattr, p)) != APR_SUCCESS) ||
-        ((rc = apr_procattr_io_set(procattr, APR_FULL_BLOCK, APR_FULL_BLOCK,
-                                   APR_NO_PIPE)) != APR_SUCCESS) ||
-        ((rc = apr_procattr_dir_set(procattr,
-                                   ap_make_dirstr_parent(p, argv[0])))
-         != APR_SUCCESS) ||
-        ((rc = apr_procattr_cmdtype_set(procattr, APR_PROGRAM)) != APR_SUCCESS) ||
-        ((rc = apr_procattr_child_errfn_set(procattr, rewrite_child_errfn)) != APR_SUCCESS) ||
-        ((rc = apr_procattr_error_check_set(procattr, 1)) != APR_SUCCESS) ||
-        ((rc = apr_procattr_cmdtype_set(procattr, APR_PROGRAM)) != APR_SUCCESS)) {
-        /* Something bad happened, give up and go away. */
-    }
-    else {
+    if (   APR_SUCCESS == (rc=apr_procattr_create(&procattr, p))
+        && APR_SUCCESS == (rc=apr_procattr_io_set(procattr, APR_FULL_BLOCK,
+                                                  APR_FULL_BLOCK, APR_NO_PIPE))
+        && APR_SUCCESS == (rc=apr_procattr_dir_set(procattr,
+                                             ap_make_dirstr_parent(p, argv[0])))
+        && APR_SUCCESS == (rc=apr_procattr_cmdtype_set(procattr, APR_PROGRAM))
+        && APR_SUCCESS == (rc=apr_procattr_child_errfn_set(procattr,
+                                                           rewrite_child_errfn))
+        && APR_SUCCESS == (rc=apr_procattr_error_check_set(procattr, 1))) {
+
         procnew = apr_pcalloc(p, sizeof(*procnew));
         rc = apr_proc_create(procnew, argv[0], (const char **)argv, NULL,
                              procattr, p);