On 10/01/2010 09:31 AM, Daniel Veillard wrote:
-    ret = qemudDomainHotplugVcpus(vm, nvcpus);
+    switch (flags) {
+    case VIR_DOMAIN_VCPU_MAXIMUM | VIR_DOMAIN_VCPU_PERSISTENT:

  hum I usually indent the cases 4 spaces from the switch, minor nit

I just used what emacs gave by default, after applying the suggested ~/.emacs settings from HACKING. In that mode, emacs puts the labels flush with the switch. The libvirt code base has a decent mix of both styles, but favors my style over yours (don't ask me how much time I wasted trying to figure out that sed script):

$ git grep -A1 switch src \
 | sed -n 's/:/-/;/switch/{N;/^\(.*\)switch.*\n\1case/p}' | wc -l
350
$ git grep -A1 switch src \
 | sed -n 's/:/-/;/switch/{N;/^\(.*\)switch.*\n\1  *case/p}' | wc -l
96

Speaking of indentation nits, are we any closer to Jim's idea of using an automated indent-like tool for setting on a consistent formatting style?

--
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to