summaryrefslogtreecommitdiff
path: root/tests/securityselinuxtest.c
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2021-03-11 08:16:13 +0100
committerMichal Privoznik <mprivozn@redhat.com>2021-04-13 17:00:38 +0200
commitc8238579fb0b1c3affbd77749ae2b2c4dfafb2d6 (patch)
treec6afbdd2a2baa03b365d69018770beed4c8aff32 /tests/securityselinuxtest.c
parentc21f066d61e4186fec0a2d4b4f90e901ed5b9611 (diff)
downloadlibvirt-c8238579fb0b1c3affbd77749ae2b2c4dfafb2d6.tar.gz
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>
Diffstat (limited to 'tests/securityselinuxtest.c')
-rw-r--r--tests/securityselinuxtest.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/securityselinuxtest.c b/tests/securityselinuxtest.c
index a75ff495eb..9b65eeb994 100644
--- a/tests/securityselinuxtest.c
+++ b/tests/securityselinuxtest.c
@@ -39,7 +39,7 @@
VIR_LOG_INIT("tests.securityselinuxtest");
struct testSELinuxGenLabelData {
- virSecurityManagerPtr mgr;
+ virSecurityManager *mgr;
const char *pidcon;
@@ -59,19 +59,19 @@ struct testSELinuxGenLabelData {
int catMax;
};
-static virDomainDefPtr
+static virDomainDef *
testBuildDomainDef(bool dynamic,
const char *label,
const char *baselabel)
{
- virDomainDefPtr def;
- virSecurityLabelDefPtr secdef = NULL;
+ virDomainDef *def;
+ virSecurityLabelDef *secdef = NULL;
if (!(def = virDomainDefNew()))
goto error;
def->virtType = VIR_DOMAIN_VIRT_KVM;
- def->seclabels = g_new0(virSecurityLabelDefPtr, 1);
+ def->seclabels = g_new0(virSecurityLabelDef *, 1);
secdef = g_new0(virSecurityLabelDef, 1);
@@ -211,7 +211,7 @@ testSELinuxGenLabel(const void *opaque)
{
const struct testSELinuxGenLabelData *data = opaque;
int ret = -1;
- virDomainDefPtr def;
+ virDomainDef *def;
context_t con = NULL;
context_t imgcon = NULL;
@@ -265,7 +265,7 @@ static int
mymain(void)
{
int ret = 0;
- virSecurityManagerPtr mgr;
+ virSecurityManager *mgr;
if (!(mgr = virSecurityManagerNew("selinux", "QEMU",
VIR_SECURITY_MANAGER_DEFAULT_CONFINED |