]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virDomainNetDefFormat: Rename @attrBuf to @targetAttrBuf
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 31 Jan 2023 15:23:58 +0000 (16:23 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 1 Feb 2023 07:36:22 +0000 (08:36 +0100)
The @attrBuf variable in virDomainNetDefFormat() is named too
broadly. It holds attribute buffer to the <target/> element.
Rename it to @targetAttrBuf then.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/conf/domain_conf.c

index 0cd6020ea3a9aa7b80cb890ad88241640bea3137..382c32db67343c37f9131b28ad96884b9efdea83 100644 (file)
@@ -23685,7 +23685,7 @@ virDomainNetDefFormat(virBuffer *buf,
     const char *typeStr;
     virDomainHostdevDef *hostdef = NULL;
     char macstr[VIR_MAC_STRING_BUFLEN];
-    g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
+    g_auto(virBuffer) targetAttrBuf = VIR_BUFFER_INITIALIZER;
     const char *prefix = xmlopt ? xmlopt->config.netPrefix : NULL;
 
     /* publicActual is true if we should report the current state in
@@ -23945,14 +23945,14 @@ virDomainNetDefFormat(virBuffer *buf,
             STRPREFIX(def->ifname, VIR_NET_GENERATED_MACVLAN_PREFIX) ||
             (prefix && STRPREFIX(def->ifname, prefix)))))) {
         /* Skip auto-generated target names for inactive config. */
-        virBufferEscapeString(&attrBuf, " dev='%s'", def->ifname);
+        virBufferEscapeString(&targetAttrBuf, " dev='%s'", def->ifname);
     }
     if (def->managed_tap != VIR_TRISTATE_BOOL_ABSENT) {
-        virBufferAsprintf(&attrBuf, " managed='%s'",
+        virBufferAsprintf(&targetAttrBuf, " managed='%s'",
                           virTristateBoolTypeToString(def->managed_tap));
     }
 
-    virXMLFormatElement(buf, "target", &attrBuf, NULL);
+    virXMLFormatElement(buf, "target", &targetAttrBuf, NULL);
 
     if (def->ifname_guest || def->ifname_guest_actual) {
         virBufferAddLit(buf, "<guest");