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

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



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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