Re: [PATCHv2 12/13] snapshot: minor cleanups from reviewing indentation

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

 



On 10/21/2011 02:08 PM, Peter Krempa wrote:
Dňa 29.9.2011 18:22, Eric Blake wrote / napísal(a):
Break some long lines, and use more efficient functions when possible,
such as relying on virBufferEscapeString to skip output on a NULL arg.
Ensure that output does not embed newlines, since auto-indent won't
work in those situations.

* src/conf/domain_conf.c (virDomainTimerDefFormat): Break output lines.
(virDomainDefFormatInternal, virDomainDiskDefFormat)
(virDomainActualNetDefFormat, virDomainNetDefFormat)
(virDomainHostdevDefFormat): Minor cleanups.
---

if (def->mem.hugepage_backed) {
- virBufferAddLit(buf, "<memoryBacking>\n");
- virBufferAddLit(buf, "<hugepages/>\n");
- virBufferAddLit(buf, "</memoryBacking>\n");

I'd probably break the first string on a new line too, to have them
nicely lined up.

+ virBufferStrcat(buf, "<memoryBacking>\n",
+ "<hugepages/>\n",
+ "</memoryBacking>\n", NULL);
}

Done.

virBufferAsprintf(buf, "<memory mode='%s' nodeset='%s'/>\n",
- virDomainNumatuneMemModeTypeToString(def->numatune.memory.mode),
+ virDomainNumatuneMemModeTypeToString(def->numatune.
+ memory.mode),

They shoul have made terminals with more than 80 cols at the very
beginning :( This looked a little bit confusing to me at first,
interpreting the dot as a comma ... but, well, it works.

I improved that one as well.


ACK, you can safely ignore my comments to this patch, as they don't
address any important issues :).

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]