mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
ovs.db.types: Use toAtomicType() instead of open-coding it.
Suggested-by: Reid Price <reid@nicira.com>
This commit is contained in:
@@ -337,8 +337,8 @@ class BaseType(object):
|
||||
|
||||
def cInitBaseType(self, indent, var):
|
||||
stmts = []
|
||||
stmts.append('ovsdb_base_type_init(&%s, OVSDB_TYPE_%s);' % (
|
||||
var, self.type.to_string().upper()),)
|
||||
stmts.append('ovsdb_base_type_init(&%s, %s);' % (
|
||||
var, self.toAtomicType()))
|
||||
if self.enum:
|
||||
stmts.append("%s.enum_ = xmalloc(sizeof *%s.enum_);"
|
||||
% (var, var))
|
||||
|
Reference in New Issue
Block a user