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:
@@ -429,7 +429,7 @@ static int test12(const void *unused G_GNUC_UNUSED)
|
||||
*/
|
||||
static int test13(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
virCommand *cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
g_autofree char *outactual = NULL;
|
||||
const char *outexpect = "BEGIN STDOUT\n"
|
||||
"Hello World\n"
|
||||
@@ -467,7 +467,7 @@ static int test13(const void *unused G_GNUC_UNUSED)
|
||||
*/
|
||||
static int test14(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
virCommand *cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
g_autofree char *outactual = NULL;
|
||||
const char *outexpect = "BEGIN STDOUT\n"
|
||||
"Hello World\n"
|
||||
@@ -646,7 +646,7 @@ static int test17(const void *unused G_GNUC_UNUSED)
|
||||
*/
|
||||
static int test18(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNewArgList("sleep", "100", NULL);
|
||||
virCommand *cmd = virCommandNewArgList("sleep", "100", NULL);
|
||||
g_autofree char *pidfile = virPidFileBuildPath(abs_builddir, "commandhelper");
|
||||
pid_t pid;
|
||||
int ret = -1;
|
||||
@@ -806,7 +806,7 @@ static int
|
||||
test22(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
virCommandPtr cmd;
|
||||
virCommand *cmd;
|
||||
int status = -1;
|
||||
|
||||
cmd = virCommandNewArgList("/bin/sh", "-c", "exit 3", NULL);
|
||||
|
||||
Reference in New Issue
Block a user