r15861@catbus: nickm | 2007-10-16 13:10:22 -0400

Fix example use of hash table iterators


svn:r11991
This commit is contained in:
Nick Mathewson 2007-10-16 17:21:05 +00:00
parent 0dab1a14a5
commit 2e131e31b5

View File

@ -956,11 +956,11 @@ strmap_remove_lc(strmap_t *map, const char *key)
* strmap_iter_get(iter, &key, &val); * strmap_iter_get(iter, &key, &val);
* cp = (char*)val; * cp = (char*)val;
* if (!*cp) { * if (!*cp) {
* iter = strmap_iter_next_rmv(iter); * iter = strmap_iter_next_rmv(map,iter);
* free(val); * free(val);
* } else { * } else {
* for (;*cp;cp++) *cp = TOR_TOUPPER(*cp); * for (;*cp;cp++) *cp = TOR_TOUPPER(*cp);
* iter = strmap_iter_next(iter); * iter = strmap_iter_next(map,iter);
* } * }
* } * }
* \endcode * \endcode