mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
domain_conf: Switch to virBufferAddLit for literal strings
There's no need to use virBufferAddStr() for literal strings without any newline character as it's more expensive than virBufferAddLit(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
parent
4e39625095
commit
a9d1c08b71
@ -25376,7 +25376,7 @@ virDomainGraphicsDefFormat(virBuffer *buf,
|
||||
|
||||
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE:
|
||||
if (flags & VIR_DOMAIN_DEF_FORMAT_MIGRATABLE)
|
||||
virBufferAddStr(buf, " autoport='no'");
|
||||
virBufferAddLit(buf, " autoport='no'");
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET:
|
||||
@ -25388,7 +25388,7 @@ virDomainGraphicsDefFormat(virBuffer *buf,
|
||||
* parsed as listen type "none". */
|
||||
if ((flags & VIR_DOMAIN_DEF_FORMAT_MIGRATABLE) &&
|
||||
glisten->fromConfig) {
|
||||
virBufferAddStr(buf, " autoport='yes'");
|
||||
virBufferAddLit(buf, " autoport='yes'");
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user