]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib map: comment around the change in parent commit
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 22 Jan 2018 14:58:24 +0000 (15:58 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 22 Jan 2018 15:10:24 +0000 (16:10 +0100)
lib/generic/map.c
lib/generic/map.h

index 4920bb2a9ef9e28869d5ab8838cd67dd42e3be71..73de090a39e09e227ccd431050ba40144afa9f3c 100644 (file)
@@ -118,6 +118,7 @@ static cb_data_t *cbt_make_data(map_t *map, const uint8_t *str, size_t len, void
        return x;
 }
 
+/*! Like map_contains, but also set the value, if passed and found. */
 static int cbt_get(map_t *map, const char *str, void **value)
 {
        const uint8_t *ubytes = (void *)str;
index dc459f5ef9f271c9bff8bb2d1fd426aab16cc10a..9a4c3c08dea61db0089de85f4e73484b3d5a324a 100644 (file)
@@ -76,7 +76,7 @@ map_t map_make(void);
 /** Returns non-zero if map contains str */
 int map_contains(map_t *map, const char *str);
 
-/** Returns value if map contains str */
+/** Returns value if map contains str.  Note: NULL may mean two different things. */
 void *map_get(map_t *map, const char *str);
 
 /** Inserts str into map, returns 0 on suceess */