Empty type-systems are just fine. Avoid the nasty hack in
union-type-systems that treat empty type-systems as invalid. Instead check
for the actual types-array and make sure it's non-NULL (which is even true
for empty type-systems, due to "empty_types" array).
return -EOPNOTSUPP;
type_system = &type_system_union->type_systems[protocol];
return -EOPNOTSUPP;
type_system = &type_system_union->type_systems[protocol];
- if (type_system->count == 0)
+ if (!type_system->types)
return -EOPNOTSUPP;
*ret = type_system;
return -EOPNOTSUPP;
*ret = type_system;