mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
lib: Drop internal virXXXPtr typedefs
Historically, we declared pointer type to our types: typedef struct _virXXX virXXX; typedef virXXX *virXXXPtr; But usefulness of such declaration is questionable, at best. Unfortunately, we can't drop every such declaration - we have to carry some over, because they are part of public API (e.g. virDomainPtr). But for internal types - we can do drop them and use what every other C project uses 'virXXX *'. This change was generated by a very ugly shell script that generated sed script which was then called over each file in the repository. For the shell script refer to the cover letter: https://listman.redhat.com/archives/libvir-list/2021-March/msg00537.html Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
@@ -41,7 +41,7 @@ virshDomainNameCompleter(vshControl *ctl,
|
||||
const vshCmd *cmd G_GNUC_UNUSED,
|
||||
unsigned int flags)
|
||||
{
|
||||
virshControlPtr priv = ctl->privData;
|
||||
virshControl *priv = ctl->privData;
|
||||
virDomainPtr *domains = NULL;
|
||||
int ndomains = 0;
|
||||
size_t i = 0;
|
||||
@@ -88,7 +88,7 @@ virshDomainUUIDCompleter(vshControl *ctl,
|
||||
const vshCmd *cmd G_GNUC_UNUSED,
|
||||
unsigned int flags)
|
||||
{
|
||||
virshControlPtr priv = ctl->privData;
|
||||
virshControl *priv = ctl->privData;
|
||||
virDomainPtr *domains = NULL;
|
||||
int ndomains = 0;
|
||||
size_t i = 0;
|
||||
@@ -139,7 +139,7 @@ virshDomainInterfaceCompleter(vshControl *ctl,
|
||||
const vshCmd *cmd,
|
||||
unsigned int flags)
|
||||
{
|
||||
virshControlPtr priv = ctl->privData;
|
||||
virshControl *priv = ctl->privData;
|
||||
g_autoptr(xmlDoc) xmldoc = NULL;
|
||||
g_autoptr(xmlXPathContext) ctxt = NULL;
|
||||
int ninterfaces;
|
||||
@@ -187,7 +187,7 @@ virshDomainDiskTargetCompleter(vshControl *ctl,
|
||||
const vshCmd *cmd,
|
||||
unsigned int flags)
|
||||
{
|
||||
virshControlPtr priv = ctl->privData;
|
||||
virshControl *priv = ctl->privData;
|
||||
g_autoptr(xmlDoc) xmldoc = NULL;
|
||||
g_autoptr(xmlXPathContext) ctxt = NULL;
|
||||
g_autofree xmlNodePtr *disks = NULL;
|
||||
@@ -243,7 +243,7 @@ virshDomainInterfaceStateCompleter(vshControl *ctl,
|
||||
const vshCmd *cmd,
|
||||
unsigned int flags)
|
||||
{
|
||||
virshControlPtr priv = ctl->privData;
|
||||
virshControl *priv = ctl->privData;
|
||||
const char *iface = NULL;
|
||||
g_autoptr(xmlDoc) xml = NULL;
|
||||
g_autoptr(xmlXPathContext) ctxt = NULL;
|
||||
@@ -300,7 +300,7 @@ virshDomainDeviceAliasCompleter(vshControl *ctl,
|
||||
const vshCmd *cmd,
|
||||
unsigned int flags)
|
||||
{
|
||||
virshControlPtr priv = ctl->privData;
|
||||
virshControl *priv = ctl->privData;
|
||||
g_autoptr(xmlDoc) xmldoc = NULL;
|
||||
g_autoptr(xmlXPathContext) ctxt = NULL;
|
||||
int naliases;
|
||||
@@ -563,7 +563,7 @@ virshDomainCpulistCompleter(vshControl *ctl,
|
||||
const vshCmd *cmd,
|
||||
unsigned int flags)
|
||||
{
|
||||
virshControlPtr priv = ctl->privData;
|
||||
virshControl *priv = ctl->privData;
|
||||
size_t i;
|
||||
int cpunum;
|
||||
g_autofree unsigned char *cpumap = NULL;
|
||||
@@ -672,7 +672,7 @@ virshDomainConsoleCompleter(vshControl *ctl,
|
||||
const vshCmd *cmd,
|
||||
unsigned int flags)
|
||||
{
|
||||
virshControlPtr priv = ctl->privData;
|
||||
virshControl *priv = ctl->privData;
|
||||
g_autoptr(xmlDoc) xmldoc = NULL;
|
||||
g_autoptr(xmlXPathContext) ctxt = NULL;
|
||||
int nserials;
|
||||
|
||||
Reference in New Issue
Block a user