- switch (list->type & CF_MTYPE)
- {
- case CF_STRING:
- case CF_QSTRING:
- rb_free(list->v.string);
- break;
- case CF_LIST:
- free_cur_list(list->v.list);
- break;
- default: break;
+ if (list->type == CF_STRING || list->type == CF_QSTRING) {
+ rb_free(list->v.string);
+ } else if (list->type == CF_FLIST) {
+ /* Even though CF_FLIST is a flag, comparing with == is valid
+ * because conf_parm_t.type must be either a type or one flag.
+ */
+ free_cur_list(list->v.list);