summaryrefslogtreecommitdiff
path: root/tests/virfilewrapper.c
diff options
context:
space:
mode:
authorJán Tomko <jtomko@redhat.com>2019-10-15 15:16:31 +0200
committerJán Tomko <jtomko@redhat.com>2019-10-16 12:06:43 +0200
commit1e2ae2e311c7453e7894e93688f8785736aa0618 (patch)
tree1b0711d8ce2f8052b8fc394d735693f5a4539477 /tests/virfilewrapper.c
parent2b2c67b401d10d9752fe9c390c88a1555ccbe947 (diff)
downloadlibvirt-1e2ae2e311c7453e7894e93688f8785736aa0618.tar.gz
Use g_autofree instead of VIR_AUTOFREE
Since commit 44e7f029159ed701b4a1739ac711507ee53790ed util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOFREE is just an alias for g_autofree. Use the GLib macros directly instead of our custom aliases. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Diffstat (limited to 'tests/virfilewrapper.c')
-rw-r--r--tests/virfilewrapper.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c
index 3d3f319f2c..b6032f88fd 100644
--- a/tests/virfilewrapper.c
+++ b/tests/virfilewrapper.c
@@ -145,7 +145,7 @@ virMockStatRedirect(const char *path, char **newpath)
FILE *fopen(const char *path, const char *mode)
{
- VIR_AUTOFREE(char *) newpath = NULL;
+ g_autofree char *newpath = NULL;
PATH_OVERRIDE(newpath, path);
@@ -154,7 +154,7 @@ FILE *fopen(const char *path, const char *mode)
int access(const char *path, int mode)
{
- VIR_AUTOFREE(char *) newpath = NULL;
+ g_autofree char *newpath = NULL;
PATH_OVERRIDE(newpath, path);
@@ -168,7 +168,7 @@ int _open(const char *path, int flags, ...)
int open(const char *path, int flags, ...)
# endif
{
- VIR_AUTOFREE(char *) newpath = NULL;
+ g_autofree char *newpath = NULL;
va_list ap;
mode_t mode = 0;
@@ -188,7 +188,7 @@ int open(const char *path, int flags, ...)
DIR *opendir(const char *path)
{
- VIR_AUTOFREE(char *) newpath = NULL;
+ g_autofree char *newpath = NULL;
PATH_OVERRIDE(newpath, path);
@@ -197,7 +197,7 @@ DIR *opendir(const char *path)
int execv(const char *path, char *const argv[])
{
- VIR_AUTOFREE(char *) newpath = NULL;
+ g_autofree char *newpath = NULL;
PATH_OVERRIDE(newpath, path);
@@ -206,7 +206,7 @@ int execv(const char *path, char *const argv[])
int execve(const char *path, char *const argv[], char *const envp[])
{
- VIR_AUTOFREE(char *) newpath = NULL;
+ g_autofree char *newpath = NULL;
PATH_OVERRIDE(newpath, path);