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(a)redhat.com>
---
src/conf/domain_conf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 4c7a5a044c..44a01ab628 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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;
--
2.35.1