X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fstrmap%2Fstrmap.h;h=d6104942f4cea6c7cb218bfd386ced9f96ec3b1a;hp=e85b8c8f898f599d9d292f8367d1dcf3d7468fdd;hb=8bb0697b44f0dc4168f72ee621a291d68fefd4ad;hpb=13911ef769824a0958e1f1ce7292dfc8f23feb18 diff --git a/ccan/strmap/strmap.h b/ccan/strmap/strmap.h index e85b8c8f..d6104942 100644 --- a/ccan/strmap/strmap.h +++ b/ccan/strmap/strmap.h @@ -77,7 +77,7 @@ static inline bool strmap_empty_(const struct strmap *map) * @map: the typed strmap to search. * @member: the string to search for. * - * Returns the value, or NULL if it isn't in the map. + * Returns the value, or NULL if it isn't in the map (and sets errno = ENOENT). * * Example: * int *val = strmap_get(&map, "hello"); @@ -118,7 +118,9 @@ bool strmap_add_(struct strmap *map, const char *member, const void *value); * @member: the string to remove from the map. * @valuep: the value (if non-NULL) * - * This returns the string which was passed to strmap_map(), or NULL. + * This returns the string which was passed to strmap_map(), or NULL if + * it was not in the map (and sets errno = ENOENT). + * * This means that if you allocated a string (eg. using strdup()), you * can free it here. Similarly, the value is returned in @valuep if * @valuep is not NULL.