apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject svn commit: r590037 - /apr/apr/trunk/threadproc/os2/proc.c
Date Tue, 30 Oct 2007 11:18:11 GMT
Author: bjh
Date: Tue Oct 30 04:18:10 2007
New Revision: 590037

URL: http://svn.apache.org/viewvc?rev=590037&view=rev
Log:
Fix build breakage due to syntax errors in threadproc/os2/proc.c.
I haven't yet verified that the code works but this is a step in the right 
direction.

Modified:
    apr/apr/trunk/threadproc/os2/proc.c

Modified: apr/apr/trunk/threadproc/os2/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/os2/proc.c?rev=590037&r1=590036&r2=590037&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/os2/proc.c (original)
+++ apr/apr/trunk/threadproc/os2/proc.c Tue Oct 30 04:18:10 2007
@@ -130,9 +130,11 @@
                     == APR_SUCCESS)
                 rv = apr_file_inherit_set(attr->child_in);
         }
+    }
 
     if (parent_in != NULL && rv == APR_SUCCESS) {
         rv = apr_file_dup(&attr->parent_in, parent_in, attr->pool);
+    }
 
     return rv;
 }
@@ -161,6 +163,7 @@
   
     if (parent_out != NULL && rv == APR_SUCCESS) {
         rv = apr_file_dup(&attr->parent_out, parent_out, attr->pool);
+    }
 
     return rv;
 }
@@ -189,6 +192,7 @@
   
     if (parent_err != NULL && rv == APR_SUCCESS) {
         rv = apr_file_dup(&attr->parent_err, parent_err, attr->pool);
+    }
 
     return rv;
 }
@@ -499,25 +503,22 @@
         chdir(savedir);
     }
 
-    if (attr->child_in) {
-        (attr->child_in->filedes != -1)
-            apr_file_close(attr->child_in);
+    if (attr->child_in && (attr->child_in->filedes != -1)) {
+        apr_file_close(attr->child_in);
         dup = STDIN_FILENO;
         DosDupHandle(save_in, &dup);
         DosClose(save_in);
     }
     
-    if (attr->child_out) {
-        (attr->child_err->filedes != -1)
-            apr_file_close(attr->child_out);
+    if (attr->child_out && attr->child_err->filedes != -1) {
+        apr_file_close(attr->child_out);
         dup = STDOUT_FILENO;
         DosDupHandle(save_out, &dup);
         DosClose(save_out);
     }
     
-    if (attr->child_err) {
-        (attr->child_err->filedes != -1)
-            apr_file_close(attr->child_err);
+    if (attr->child_err && attr->child_err->filedes != -1) {
+        apr_file_close(attr->child_err);
         dup = STDERR_FILENO;
         DosDupHandle(save_err, &dup);
         DosClose(save_err);



Mime
View raw message