commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r804667 - /commons/sandbox/runtime/trunk/src/main/native/shared/tables.c
Date Sun, 16 Aug 2009 11:27:58 GMT
Author: mturk
Date: Sun Aug 16 11:27:57 2009
New Revision: 804667

URL: http://svn.apache.org/viewvc?rev=804667&view=rev
Log:
Use inlined free function

Modified:
    commons/sandbox/runtime/trunk/src/main/native/shared/tables.c

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/tables.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/tables.c?rev=804667&r1=804666&r2=804667&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/tables.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/tables.c Sun Aug 16 11:27:57 2009
@@ -68,8 +68,7 @@
                                 acr_array_t *arr)
 {
     if (arr) {
-        if (arr->elts)
-            free(arr->elts);
+        x_free(arr->elts);
         free(arr);
     }
     else {
@@ -264,8 +263,7 @@
             acr_size_t i;
             table_entry_t *e = (table_entry_t *)tbl->a.elts;
             for (i = 0; i < tbl->a.nelts; i++) {
-                if (e[i].key)
-                    free(e[i].key);
+                x_free(e[i].key);
             }
             free(tbl->a.elts);
         }
@@ -344,3 +342,4 @@
         }
     }
 }
+



Mime
View raw message