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:
Michal Privoznik
2021-03-11 08:16:13 +01:00
parent c21f066d61
commit c8238579fb
734 changed files with 29338 additions and 30231 deletions

View File

@@ -158,7 +158,7 @@ cmdCheckpointCreate(vshControl *ctl,
*/
static int
virshParseCheckpointDiskspec(vshControl *ctl,
virBufferPtr buf,
virBuffer *buf,
const char *str)
{
int ret = -1;
@@ -540,10 +540,9 @@ struct virshCheckpointList {
struct virshChk *chks;
int nchks;
};
typedef struct virshCheckpointList *virshCheckpointListPtr;
static void
virshCheckpointListFree(virshCheckpointListPtr checkpointlist)
virshCheckpointListFree(struct virshCheckpointList *checkpointlist)
{
size_t i;
@@ -581,7 +580,7 @@ virshChkSorter(const void *a,
* list is limited to descendants of the given checkpoint. If FLAGS is
* given, the list is filtered. If TREE is specified, then all but
* FROM or the roots will also have parent information. */
static virshCheckpointListPtr
static struct virshCheckpointList *
virshCheckpointListCollect(vshControl *ctl,
virDomainPtr dom,
virDomainCheckpointPtr from,
@@ -591,8 +590,8 @@ virshCheckpointListCollect(vshControl *ctl,
size_t i;
int count = -1;
virDomainCheckpointPtr *chks;
virshCheckpointListPtr checkpointlist = NULL;
virshCheckpointListPtr ret = NULL;
struct virshCheckpointList *checkpointlist = NULL;
struct virshCheckpointList *ret = NULL;
unsigned int flags = orig_flags;
checkpointlist = g_new0(struct virshCheckpointList, 1);
@@ -646,7 +645,7 @@ virshCheckpointListLookup(int id,
bool parent,
void *opaque)
{
virshCheckpointListPtr checkpointlist = opaque;
struct virshCheckpointList *checkpointlist = opaque;
if (parent)
return checkpointlist->chks[id].parent;
return virDomainCheckpointGetName(checkpointlist->chks[id].chk);
@@ -731,8 +730,8 @@ cmdCheckpointList(vshControl *ctl,
const char *from_chk = NULL;
char *parent_chk = NULL;
virDomainCheckpointPtr start = NULL;
virshCheckpointListPtr checkpointlist = NULL;
vshTablePtr table = NULL;
struct virshCheckpointList *checkpointlist = NULL;
vshTable *table = NULL;
VSH_EXCLUSIVE_OPTIONS_VAR(tree, name);
VSH_EXCLUSIVE_OPTIONS_VAR(parent, roots);