8-) f**k

Mon, 12 Aug 2013 14:43:22 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 12 Aug 2013 14:43:22 +0200
changeset 139
dddb9348ea42
parent 138
7800811078b8 (current diff)
parent 137
81a02ad99388 (diff)
child 140
15f871f50bfd

8-) f**k

ucx/map.c file | annotate | diff | comparison | revisions
ucx/map.h file | annotate | diff | comparison | revisions
--- a/ucx/map.c	Mon Aug 12 14:39:51 2013 +0200
+++ b/ucx/map.c	Mon Aug 12 14:43:22 2013 +0200
@@ -32,10 +32,10 @@
 #include "map.h"
 
 UcxMap *ucx_map_new(size_t size) {
-    return ucx_map_new_a(size, NULL);
+    return ucx_map_new_a(NULL, size);
 }
 
-UcxMap *ucx_map_new_a(size_t size, UcxAllocator *allocator) {
+UcxMap *ucx_map_new_a(UcxAllocator *allocator, size_t size) {
     if(size == 0) {
         size = 16;
     }
@@ -45,7 +45,7 @@
     }
     
     UcxMap *map = (UcxMap*)allocator->malloc(allocator->pool, sizeof(UcxMap));
-    if(map == NULL) {
+    if (!map) {
         return NULL;
     }
     
--- a/ucx/map.h	Mon Aug 12 14:39:51 2013 +0200
+++ b/ucx/map.h	Mon Aug 12 14:43:22 2013 +0200
@@ -130,11 +130,11 @@
 
 /**
  * Creates a new hash map with the specified size using an UcxAllocator.
+ * @param allocator the allocator to use
  * @param size the size of the hash map
- * @param allocator the allocator to use
  * @return a pointer to the new hash map
  */
-UcxMap *ucx_map_new_a(size_t size, UcxAllocator *allocator);
+UcxMap *ucx_map_new_a(UcxAllocator *allocator, size_t size);
 
 /**
  * Frees a hash map.

mercurial