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
     1.1 --- a/ucx/map.c	Mon Aug 12 14:39:51 2013 +0200
     1.2 +++ b/ucx/map.c	Mon Aug 12 14:43:22 2013 +0200
     1.3 @@ -32,10 +32,10 @@
     1.4  #include "map.h"
     1.5  
     1.6  UcxMap *ucx_map_new(size_t size) {
     1.7 -    return ucx_map_new_a(size, NULL);
     1.8 +    return ucx_map_new_a(NULL, size);
     1.9  }
    1.10  
    1.11 -UcxMap *ucx_map_new_a(size_t size, UcxAllocator *allocator) {
    1.12 +UcxMap *ucx_map_new_a(UcxAllocator *allocator, size_t size) {
    1.13      if(size == 0) {
    1.14          size = 16;
    1.15      }
    1.16 @@ -45,7 +45,7 @@
    1.17      }
    1.18      
    1.19      UcxMap *map = (UcxMap*)allocator->malloc(allocator->pool, sizeof(UcxMap));
    1.20 -    if(map == NULL) {
    1.21 +    if (!map) {
    1.22          return NULL;
    1.23      }
    1.24      
     2.1 --- a/ucx/map.h	Mon Aug 12 14:39:51 2013 +0200
     2.2 +++ b/ucx/map.h	Mon Aug 12 14:43:22 2013 +0200
     2.3 @@ -130,11 +130,11 @@
     2.4  
     2.5  /**
     2.6   * Creates a new hash map with the specified size using an UcxAllocator.
     2.7 + * @param allocator the allocator to use
     2.8   * @param size the size of the hash map
     2.9 - * @param allocator the allocator to use
    2.10   * @return a pointer to the new hash map
    2.11   */
    2.12 -UcxMap *ucx_map_new_a(size_t size, UcxAllocator *allocator);
    2.13 +UcxMap *ucx_map_new_a(UcxAllocator *allocator, size_t size);
    2.14  
    2.15  /**
    2.16   * Frees a hash map.

mercurial