harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From regi...@apache.org
Subject svn commit: r959837 - /harmony/enhanced/java/trunk/classlib/modules/portlib/src/main/native/a2e/unix/atoe.c
Date Fri, 02 Jul 2010 03:18:16 GMT
Author: regisxu
Date: Fri Jul  2 03:18:15 2010
New Revision: 959837

URL: http://svn.apache.org/viewvc?rev=959837&view=rev
Log:
a little refine code format of atoe_execvp and atoe_execv, no functional changes.

Modified:
    harmony/enhanced/java/trunk/classlib/modules/portlib/src/main/native/a2e/unix/atoe.c

Modified: harmony/enhanced/java/trunk/classlib/modules/portlib/src/main/native/a2e/unix/atoe.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/portlib/src/main/native/a2e/unix/atoe.c?rev=959837&r1=959836&r2=959837&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/portlib/src/main/native/a2e/unix/atoe.c (original)
+++ harmony/enhanced/java/trunk/classlib/modules/portlib/src/main/native/a2e/unix/atoe.c Fri
Jul  2 03:18:15 2010
@@ -2035,18 +2035,18 @@ atoe_execv (const char *path, char *cons
     int size = 0, i, rc;
 
     /* Calculate the size of argv. argv always ends with a null pointer. */
-    while (*(argv+size)) {
+    while (*(argv + size)) {
         size++;
     }
 
     /* Allocate space for the new array and populate */
-    ebcdicArgv = (char**) malloc(sizeof(char*) * (size+1));
-    for (i=0; i<size; i++) {
-        *(ebcdicArgv+i) = strdup(a2e_string(argv[i]));
+    ebcdicArgv = (char**) malloc(sizeof(char*) * (size + 1));
+    for (i = 0; i < size; i++) {
+        *(ebcdicArgv + i) = strdup(a2e_string(argv[i]));
     }
 
     /* Null terminate the new array */
-    *(ebcdicArgv+size) = NULL;
+    *(ebcdicArgv + size) = NULL;
 
     rc = execv(ebcdicPath, ebcdicArgv);
 
@@ -2072,18 +2072,18 @@ atoe_execvp (const char *file, char *con
     int size = 0, i, rc;
 
     /* Calculate the size of argv. argv always ends with a null pointer. */
-    while (*(argv+size)) {
+    while (*(argv + size)) {
         size++;
     }
 
     /* Allocate space for the new array and populate */
-    ebcdicArgv = (char**) malloc(sizeof(char*) * (size+1));
-    for (i=0; i<size; i++) {
-        *(ebcdicArgv+i) = strdup(a2e_string(argv[i]));
+    ebcdicArgv = (char**) malloc(sizeof(char*) * (size + 1));
+    for (i = 0; i < size; i++) {
+        *(ebcdicArgv + i) = strdup(a2e_string(argv[i]));
     }
 
     /* Null terminate the new array */
-    *(ebcdicArgv+size) = NULL;
+    *(ebcdicArgv + size) = NULL;
 
     rc = execvp(ebcdicFile, ebcdicArgv);
 



Mime
View raw message