Mon, 12 Aug 2013 14:43:22 +0200
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.