Re: [libvirt] [PATCH 3/4] virchrdev: Use more g_autofree and VIR_AUTOCLOSE

2020-01-16 Thread Michal Privoznik
On 1/16/20 2:02 PM, Erik Skultety wrote: ... @@ -184,10 +177,8 @@ static int virChrdevLockFileCreate(const char *dev) */ static void virChrdevLockFileRemove(const char *dev) { -char *path = virChrdevLockFilePath(dev); -if (path) -unlink(path); -VIR_FREE(path); +g_

Re: [libvirt] [PATCH 3/4] virchrdev: Use more g_autofree and VIR_AUTOCLOSE

2020-01-16 Thread Erik Skultety
... > @@ -184,10 +177,8 @@ static int virChrdevLockFileCreate(const char *dev) > */ > static void virChrdevLockFileRemove(const char *dev) > { > -char *path = virChrdevLockFilePath(dev); > -if (path) > -unlink(path); > -VIR_FREE(path); > +g_autofree char *path = virChrd

[libvirt] [PATCH 3/4] virchrdev: Use more g_autofree and VIR_AUTOCLOSE

2020-01-08 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/conf/virchrdev.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c index 6e659a3783..766c264472 100644 --- a/src/conf/virchrdev.c +++ b/src/conf/virchrdev.c @@ -67,9