]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/generic: replace value on map insert if exists
authorMarek Vavruša <marek.vavrusa@nic.cz>
Thu, 21 May 2015 17:50:32 +0000 (19:50 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 25 May 2015 11:49:17 +0000 (13:49 +0200)
lib/generic/map.c

index 86c2b19aa4deb26b662c9a7f0a3495309e895a92..a6a12911a2b6bd8546dfa15b04327690ef89f45f 100644 (file)
@@ -205,6 +205,7 @@ int map_set(map_t *map, const char *str, void *value)
                newotherbits = data->key[newbyte];
                goto different_byte_found;
        }
+       data->value = value;
        return 1;
 
 different_byte_found: