- types[atomic_type] = type = xmalloc(sizeof *type);
- ovsdb_base_type_init(&type->key, atomic_type);
- ovsdb_base_type_init(&type->value, OVSDB_TYPE_VOID);
- type->n_min = 1;
- type->n_max = UINT_MAX;
+ for (i = 0; i < OVSDB_N_TYPES; i++) {
+ struct ovsdb_type *type;
+
+ types[i] = type = xmalloc(sizeof *type);
+ ovsdb_base_type_init(&type->key, i);
+ ovsdb_base_type_init(&type->value, OVSDB_TYPE_VOID);
+ type->n_min = 1;
+ type->n_max = UINT_MAX;
+ }
+
+ ovsthread_once_done(&once);