[libvirt] [PATCH] make all struct typedefs comply with proposed coding conventions

Daniel P. Berrange berrange at redhat.com
Mon Mar 6 17:56:24 UTC 2017


On Mon, Mar 06, 2017 at 12:53:23PM -0500, Laine Stump wrote:
> Proposed formal coding conventions encourage defining typedefs for
> vir[Blah] and vir[Blah]Ptr separately from the associated struct named
> _vir[Blah]:
> 
>     typedef struct _virBlah virBlah;
>     typedef virBlah *virBlahPtr;
>     struct _virBlah {
>     ...
>     };
> 
> At some point in the past, I had submitted several patches using a
> more compact style that I prefer, and they were accepted:
> 
>     typedef struct _virBlah {
>         ...
>     } virBlah, *virBlahPtr;
> 
> Since these are by far a minority among all struct definitions, this
> patch changes all those definitions to reflect the style prefered by
> the proposal so that there is 100% consistency.
> ---
> 
> https://www.redhat.com/archives/libvir-list/2017-March/msg00215.html
> 
> Now that we're talking about formalizing the format of struct
> definitions, since it was me who tried to make this catch on, it
> should be me who takes the time to fix them when they don't catch on
> :-P
> 
> 
>  src/conf/device_conf.h      | 60 ++++++++++++++++++++++++++++++---------------
>  src/conf/network_conf.h     |  6 +++--
>  src/conf/node_device_conf.h |  6 +++--
>  src/util/virnetdev.h        |  6 +++--
>  src/util/virnetdevip.h      | 18 +++++++++-----
>  5 files changed, 64 insertions(+), 32 deletions(-)

ACK


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|




More information about the libvir-list mailing list