static inline bool
ucimap_is_alloc(enum ucimap_type type)
{
- switch(type & UCIMAP_SUBTYPE) {
- case UCIMAP_STRING:
- return true;
- default:
- return false;
- }
+ return (type & UCIMAP_SUBTYPE) == UCIMAP_STRING;
}
static inline bool
ucimap_is_fixup(enum ucimap_type type)
{
- switch(type & UCIMAP_SUBTYPE) {
- case UCIMAP_SECTION:
- return true;
- default:
- return false;
- }
+ return (type & UCIMAP_SUBTYPE) == UCIMAP_SECTION;
}
static inline bool
break;
case UCIMAP_LIST:
list = f->data->list;
- data = ucimap_list_append(f->data->list);
+ data = ucimap_list_append(list);
if (!data)
return false;
} else {
sd = malloc(sm->alloc_len);
memset(sd, 0, sm->alloc_len);
+ sd = ucimap_ptr_section(sm, sd);
}
if (!sd)
continue;