src/lib/util/options.c
| r779 | r780 | |
| 828 | 828 | |
| 829 | 829 | const char *options_enumerator_next(options_enumerator *enumerator) |
| 830 | 830 | { |
| 831 | | const char *option_name = NULL; |
| 831 | astring *option_name = NULL; |
| 832 | 832 | |
| 833 | 833 | /* be sure to skip over false options */ |
| 834 | 834 | while (option_name == NULL && enumerator->current != NULL) |
| 835 | 835 | { |
| 836 | 836 | /* retrieve the current option name and advance the enumerator */ |
| 837 | | option_name = astring_c(enumerator->current->links[0].name); |
| 837 | option_name = enumerator->current->links[0].name; |
| 838 | 838 | enumerator->current = enumerator->current->next; |
| 839 | 839 | } |
| 840 | | return option_name; |
| 840 | return (option_name != NULL) ? astring_c(option_name) : NULL; |
| 841 | 841 | } |
| 842 | 842 | |
| 843 | 843 | |