[libvirt] [PATCH] xenFormatXLDisk: Fix commas for arguments
Michal Privoznik
mprivozn at redhat.com
Thu Oct 20 15:05:36 UTC 2016
On 20.10.2016 22:27, Ján Tomko wrote:
> On Thu, Oct 20, 2016 at 10:16:05PM +0800, Michal Privoznik wrote:
>> instead of:
>>
>> virBufferAdd(buf, "arg1,");
>> virBufferAdd(buf, "arg2");
>>
>> lets have:
>>
>> virBufferAdd(buf, "arg1");
>> virBufferAdd(buf, ",arg2");
>>
>
> Why?
Because it's better. Consider we want to add conditionally arg3. With my
change, it's simple:
if (cond)
virBufferAdd(buf, ",arg3");
with current code there might be a comma hanging at EOL.
Michal
More information about the libvir-list
mailing list