tlist: remove unused var warning in example.
[ccan] / ccan / tlist / tlist.h
index 1ce0b85ed9f03c01333c8412c2d260541f8724cb..937a834c0184fb4d54928ca57db9668a929b1f8c 100644 (file)
  * Example:
  *     struct child *first;
  *     first = tlist_top(&parent->children, list);
+ *     if (!first)
+ *             printf("Empty list!\n");
  */
 #define tlist_top(h, member)                                           \
        ((tcon_type((h), canary))                                       \
  * Example:
  *     struct child *last;
  *     last = tlist_tail(&parent->children, list);
+ *     if (!last)
+ *             printf("Empty list!\n");
  */
 #define tlist_tail(h, member)                                          \
        ((tcon_type((h), canary))                                       \