Skip to content
  • Eric Blake's avatar
    4752cdbb
    qapi: Drop inline nested struct in query-version · 4752cdbb
    Eric Blake authored
    
    
    A future patch will be using a 'name':{dictionary} entry in the
    QAPI schema to specify a default value for an optional argument
    (see previous commit message for more details why); but existing
    use of inline nested structs conflicts with that goal. This patch
    fixes one of only two commands relying on nested types, by
    breaking the nesting into an explicit type; it means that the
    type is now boxed instead of unboxed in C code, but the QMP wire
    format is unaffected by this change.
    
    Prefer the safer g_new0() while making the conversion.
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    4752cdbb
    qapi: Drop inline nested struct in query-version
    Eric Blake authored
    
    
    A future patch will be using a 'name':{dictionary} entry in the
    QAPI schema to specify a default value for an optional argument
    (see previous commit message for more details why); but existing
    use of inline nested structs conflicts with that goal. This patch
    fixes one of only two commands relying on nested types, by
    breaking the nesting into an explicit type; it means that the
    type is now boxed instead of unboxed in C code, but the QMP wire
    format is unaffected by this change.
    
    Prefer the safer g_new0() while making the conversion.
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Loading