[libvirt] [PATCH v2 03/16] Use K&R style for curly braces in src/util/

Martin Kletzander mkletzan at redhat.com
Thu Mar 20 16:05:25 UTC 2014


On Thu, Mar 20, 2014 at 03:20:52PM +0000, Daniel P. Berrange wrote:
> On Wed, Mar 19, 2014 at 12:18:43PM +0100, Martin Kletzander wrote:
> > Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> > ---
> >  src/util/vircgroup.c             |  9 ++++++---
> >  src/util/virconf.c               |  5 +++--
> >  src/util/virdbus.c               |  8 +++++---
> >  src/util/virerror.c              |  3 ++-
> >  src/util/vireventpoll.c          | 29 +++++++++++++++++++----------
> >  src/util/virhook.c               | 11 +++++++----
> >  src/util/virnetdevvportprofile.c |  5 +++--
> >  src/util/virrandom.c             |  5 +++--
> >  src/util/virsocketaddr.c         | 26 +++++++++++++++++---------
> >  src/util/virsysinfo.c            | 15 ++++++++++-----
> >  src/util/virthread.c             |  5 +++--
> >  src/util/virutil.c               | 20 +++++++++++++-------
> >  src/util/virutil.h               | 12 ++++++++----
> >  src/util/viruuid.c               |  5 +++--
> >  14 files changed, 102 insertions(+), 56 deletions(-)
>
>
>
> >
> > diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
> > index c5925b1..84847b2 100644
> > --- a/src/util/vircgroup.c
> > +++ b/src/util/vircgroup.c
> > @@ -419,7 +419,8 @@ virCgroupCopyPlacement(virCgroupPtr group,
> >              /*
> >               * parent == "/" + path="" => "/"
> >               * parent == "/libvirt.service" + path == "" => "/libvirt.service"
> > -             * parent == "/libvirt.service" + path == "foo" => "/libvirt.service/foo"
> > +             * parent == "/libvirt.service" +
> > +             *                         path == "foo" => "/libvirt.service/foo"
> >               */
> >              if (virAsprintf(&group->controllers[i].placement,
> >                              "%s%s%s",
> > @@ -519,8 +520,10 @@ virCgroupDetectPlacement(virCgroupPtr group,
> >
> >                  /*
> >                   * selfpath == "/" + path="" -> "/"
> > -                 * selfpath == "/libvirt.service" + path == "" -> "/libvirt.service"
> > -                 * selfpath == "/libvirt.service" + path == "foo" -> "/libvirt.service/foo"
> > +                 * selfpath == "/libvirt.service" +
> > +                 *                       path == "" -> "/libvirt.service"
> > +                 * selfpath == "/libvirt.service" +
> > +                 *                       path == "foo" -> "/libvirt.service/foo"
> >                   */
> >                  if (typelen == len && STREQLEN(typestr, tmp, len) &&
> >                      group->controllers[i].mountPoint != NULL &&
>
> These two chunks aren't related to curly brace changes. This kind of thing
> is an example where I think long lines are better than forced line breaks
> which harm readability.
>

I went through all the lines longer than 80 lines somewhere and this
is a leftover of non-applied fixup for commit cc9c62fe (Require spaces
around equality comparisons).  I'll definitely drop this hunk as it
doesn't even belong here.

> ACK to everything else in the patch except this.
>
> Regards,
> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140320/8d3c50ec/attachment-0001.sig>


More information about the libvir-list mailing list