[libvirt] [PATCH 1/3] conf: rename structs used by Export function
Andrea Bolognani
abologna at redhat.com
Fri Aug 3 14:36:13 UTC 2018
On Mon, 2018-07-30 at 10:07 -0400, Anya Harter wrote:
> conf: rename structs used by Export function
>
> to be the name of the Export function followed by Data
>
> ex. for virInterfaceObjListExport, the struct is named
> virInterfaceObjListExportData
The title and body of the commit message should be able to stand
on their own as complete sentences, so you'll have to rework the
latter.
[...]
> -struct virInterfaceObjListData {
> +struct virInterfaceObjListExportData {
> virConnectPtr conn;
> virInterfacePtr *ifaces;
> virInterfaceObjListFilter filter;
> @@ -274,7 +274,7 @@ virInterfaceObjListPopulate(void *payload,
> const void *name ATTRIBUTE_UNUSED,
> void *opaque)
> {
> - struct virInterfaceObjListData *data = opaque;
> + struct virInterfaceObjListExportData *data = opaque;
This is kind of a weird pattern in the context of libvirt: most
structs are defined as
typedef struct _virSomething virSomething;
typedef virSomething *virSomethingPtr;
struct _virSomething {
...
};
Since you're tweaking both the definitions and the usage sites
anyway, might as well go the extra mile and adopt the most
common style as well.
Everything else looks good.
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list