Re: [PATCH] xenFormatXLDisk: Fix commas for arguments

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

 



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

--
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]