From: Vladimír Čunát Date: Mon, 22 Jan 2018 14:58:24 +0000 (+0100) Subject: lib map: comment around the change in parent commit X-Git-Tag: v2.0.0~22^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b89e3474d350c8ff3da5ed5866b0bb08395473b;p=thirdparty%2Fknot-resolver.git lib map: comment around the change in parent commit --- diff --git a/lib/generic/map.c b/lib/generic/map.c index 4920bb2a9..73de090a3 100644 --- a/lib/generic/map.c +++ b/lib/generic/map.c @@ -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; diff --git a/lib/generic/map.h b/lib/generic/map.h index dc459f5ef..9a4c3c08d 100644 --- a/lib/generic/map.h +++ b/lib/generic/map.h @@ -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 */