axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject svn commit: r809982 - /webservices/axis2/trunk/c/util/src/string.c
Date Tue, 01 Sep 2009 11:49:18 GMT
Author: shankar
Date: Tue Sep  1 11:49:18 2009
New Revision: 809982

URL: http://svn.apache.org/viewvc?rev=809982&view=rev
Log:
code formatting 

Modified:
    webservices/axis2/trunk/c/util/src/string.c

Modified: webservices/axis2/trunk/c/util/src/string.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/string.c?rev=809982&r1=809981&r2=809982&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/string.c (original)
+++ webservices/axis2/trunk/c/util/src/string.c Tue Sep  1 11:49:18 2009
@@ -375,51 +375,51 @@
             saved_lengths[nargs++] = cplen;
         }
         len += cplen;
-cp    = va_arg(adummy, axis2_char_t *);
-}
+        cp    = va_arg(adummy, axis2_char_t *);
+    }
 
-va_end(adummy);
+    va_end(adummy);
 
-/* Allocate the required string */
-str_len = (int)(sizeof(axis2_char_t) * (len + 1));
-/* We are sure that the difference lies within the int range */
-str = (axis2_char_t *) AXIS2_MALLOC(env->allocator, str_len);
-if (!str)
-{
-    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
-    return NULL;
-}
-cp = str;
+    /* Allocate the required string */
+    str_len = (int)(sizeof(axis2_char_t) * (len + 1));
+    /* We are sure that the difference lies within the int range */
+    str = (axis2_char_t *) AXIS2_MALLOC(env->allocator, str_len);
+    if (!str)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
+        return NULL;
+    }
+    cp = str;
 
-/* Pass two --- copy the argument strings into the result space */
+    /* Pass two --- copy the argument strings into the result space */
 
-va_start(adummy, env);
+    va_start(adummy, env);
 
-nargs = 0;
-argp = va_arg(adummy, axis2_char_t *);
-while (argp)
-{
-    if (nargs < MAX_SAVED_LENGTHS)
-    {
-        len = saved_lengths[nargs++];
-    }
-    else
+    nargs = 0;
+    argp = va_arg(adummy, axis2_char_t *);
+    while (argp)
     {
-        len = strlen(argp);
-    }
+        if (nargs < MAX_SAVED_LENGTHS)
+        {
+            len = saved_lengths[nargs++];
+        }
+        else
+        {
+            len = strlen(argp);
+        }
 
-    memcpy(cp, argp, len);
-    cp += len;
-    argp = va_arg(adummy, axis2_char_t *);
-}
+        memcpy(cp, argp, len);
+        cp += len;
+        argp = va_arg(adummy, axis2_char_t *);
+    }
 
-va_end(adummy);
+    va_end(adummy);
 
-/* Return the result string */
+    /* Return the result string */
 
-*cp = '\0';
-return str;
+    *cp = '\0';
+    return str;
 }
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL



Mime
View raw message