diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-06-26 02:42:14 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-06-26 02:42:14 +0200 |
commit | cca5a5d6cce6fd11a94bb6219916136a08ed0657 (patch) | |
tree | 963182e308d17b4b4b622d6082223ebc6c9ef3e5 /src/argparser.c | |
parent | return list of values when freeing a map (diff) | |
download | argparser-cca5a5d6cce6fd11a94bb6219916136a08ed0657.tar.gz argparser-cca5a5d6cce6fd11a94bb6219916136a08ed0657.tar.bz2 argparser-cca5a5d6cce6fd11a94bb6219916136a08ed0657.tar.xz |
whoops
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/argparser.c')
-rw-r--r-- | src/argparser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/argparser.c b/src/argparser.c index a6452fb..bb1f3ce 100644 --- a/src/argparser.c +++ b/src/argparser.c @@ -1503,7 +1503,7 @@ static void _map_free(void** level, long has_value) if ((value = *(level + 16))) { if (args_map_values_ptr == args_map_values_size) - args_map_values = (void**)realloc(args_map_values_size <<= 1, sizeof(void*)); + args_map_values = (void**)realloc(args_map_values, (args_map_values_size <<= 1) * sizeof(void*)); *(args_map_values + args_map_values_ptr++) = value; } free(level); @@ -1526,7 +1526,7 @@ static void** map_free(args_Map* map) args_map_values = (void**)malloc(64 * sizeof(void*)); _map_free(map->data, true); if (args_map_values_ptr == args_map_values_size) - args_map_values = (void**)realloc(args_map_values_size + 1, sizeof(void*)); + args_map_values = (void**)realloc(args_map_values, (args_map_values_size + 1) * sizeof(void*)); *(args_map_values + args_map_values_ptr) = null; return args_map_values; } |