Merge with 6721482eaf8e8d35b1cd46f0a21285bfaa520d5a

Fri, 12 Oct 2012 12:09:00 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 12 Oct 2012 12:09:00 +0200
changeset 72
bb3eae81aae8
parent 71
303dabadff1c (current diff)
parent 70
6721482eaf8e (diff)
child 73
f15c7d6aebb9

Merge with 6721482eaf8e8d35b1cd46f0a21285bfaa520d5a

--- a/ucx/map.c	Fri Oct 12 12:08:34 2012 +0200
+++ b/ucx/map.c	Fri Oct 12 12:09:00 2012 +0200
@@ -28,7 +28,7 @@
     return map;
 }
 
-void ucx_map_free(UcxMap *map) {
+void ucx_map_free_elmlist(UcxMap *map) {
     for (size_t n = 0 ; n < map->size ; n++) {
         UcxMapElement *elem = map->map[n];
         if (elem != NULL) {
@@ -41,6 +41,10 @@
         }
     }
     free(map->map);
+}
+
+void ucx_map_free(UcxMap *map) {
+    ucx_map_free_elmlist(map);
     free(map);
 }
 
@@ -83,7 +87,9 @@
         }
         map->count = 0;
         ucx_map_copy(&oldmap, map, NULL, NULL);
-        /* TODO: free the UcxMapElement list of oldmap */
+        
+        /* free the UcxMapElement list of oldmap */
+        ucx_map_free_elmlist(&oldmap);
     }
     return 0;
 }
--- a/ucx/test.h	Fri Oct 12 12:08:34 2012 +0200
+++ b/ucx/test.h	Fri Oct 12 12:09:00 2012 +0200
@@ -61,7 +61,7 @@
 void ucx_test_register(UcxTestSuite*, UcxTest);
 void ucx_test_run(UcxTestSuite*, FILE*);
 
-#define UCX_TEST_DECLARE(name) void name(UcxTestSuite*,FILE *);
+#define UCX_TEST_DECLARE(name) void name(UcxTestSuite*,FILE *)
 #define UCX_TEST_IMPLEMENT(name) void name(UcxTestSuite* _suite_,FILE *_output_)
 
 #define UCX_TEST_BEGIN fwrite("Running ", 1, 8, _output_);\

mercurial