On 09/01/2017 05:39 AM, Thomas Huth wrote: >>>> /* Start with a drive used by a device that unplugs instantaneously */ >>>> - qtest_start("-drive if=none,id=drive0,file=null-co://,format=raw" >>>> - " -device virtio-scsi-pci" >>>> - " -device scsi-hd,drive=drive0,id=dev0"); >>>> + args = g_strdup_printf("-drive >>>> if=none,id=drive0,file=null-co://,format=raw" >>>> + " -device virtio-scsi-%s" >>>> + " -device scsi-hd,drive=drive0,id=dev0", >>> >>> Would look better with the spaces at the end of the previous line (so >>> all "-device" are aligned), but just my taste. >> >> The -device *are* aligned, but I get what you mean. >> >> The advantage of leading rather than trailing space is that the >> intention "this is still the same string" is locally obvious both at the >> first part's end (no comma) and at the second part's beginning (leading >> space). > > I don't mind either way, but in this case, I think I'd prefer to keep > the original formatting with the space at the beginning, for the > following two reasons: > > - The first line is already hitting the 80 columns limit, and I want to > avoid complaints from checkpatch.pl > - The original author formatted it that way.
As it is, I got annoyed by the fact that we had so much strdup() of args to pass to qtest_init/qtest_start(), so my latest series reformats the code yet another way: https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg00308.html Prone to cause some fun conflict resolution if my cleanups take too long to get in the tree... -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature