]> git.ozlabs.org Git - ccan/blobdiff - ccan/strset/_info
ttxml: made alloc failure consistent - return NULL
[ccan] / ccan / strset / _info
index 81e8f53cca08b73a3c1322d2da1cb6b7d4064c9a..b5df9dfa5dc9e1a1aca0c52b1b3b479017ace365 100644 (file)
@@ -22,7 +22,7 @@
  *     static bool dump(const char *member, void *unused)
  *     {
  *             printf("%s ", member);
- *             return false;
+ *             return true; // Keep going with iteration.
  *     }
  *
  *     int main(void)
@@ -38,7 +38,7 @@
  *             for (word = strtok(file, " \t\r\n");
  *                  word;
  *                  word = strtok(NULL, " \t\r\n")) {
- *                     strset_set(&words, word);
+ *                     strset_add(&words, word);
  *             }
  *             strset_iterate(&words, dump, NULL);
  *             printf("\n");