Re: [PATCHv2 10/13] snapshot: simplify indentation of nwfilter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/21/2011 01:22 PM, Peter Krempa wrote:
Dňa 29.9.2011 18:22, Eric Blake wrote / napísal(a):
Fixing this involved some refactoring of common code out of
domain_conf and nwfilter_conf into nwfilter_params.

@@ -9562,15 +9561,11 @@ virDomainNetDefFormat(virBufferPtr buf,
}
}
if (def->filter) {
- virBufferEscapeString(buf, "<filterref filter='%s'",
- def->filter);
- attrs = virNWFilterFormatParamAttributes(def->filterparams,
- " ");

The offset of the <filterref element is 6 spaces and of NWFilter param
attributes is 8 spaces here.

- if (!attrs || strlen(attrs)<= 1)
- virBufferAddLit(buf, "/>\n");
- else
- virBufferAsprintf(buf, ">\n%s</filterref>\n", attrs);
- VIR_FREE(attrs);
+ virBufferAdjustIndent(buf, 4);

Here you add a offset of 4 (the param attributes are indented 6 spaces).
This probably should be set to 6 as other elements in this function are
indented 6 spaces. (Look into the original mail please, if you are
checking this, whitespace in this reply is mangled by thunderbird ...)

No joke about the mangling :) (Honestly, how can ANYONE drag their feet for SOOOO long at applying a patch that has already been provided? https://bugzilla.mozilla.org/show_bug.cgi?id=456053) (And a corollary - why isn't Fedora picking up that patch into their builds of thunderbird, even if upstream is dragging their feet?)

But you were right about needing 6, not 4.  Fixed.


ACK with that fixed.

and pushed.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]