On Mon, Mar 12, 2018 at 05:21:32PM +0100, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util.c | 34 ++++++++++++++++++++++++++++++++++
src/util.h | 38 ++++++++------------------------------
2 files changed, 42 insertions(+), 30 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange(a)redhat.com>
-static inline void
-virtDBusUtilVirDomainFreep(virDomainPtr *domainp)
-{
- if (*domainp)
- virDomainFree(*domainp);
-}
+void
+virtDBusUtilVirDomainFreep(virDomainPtr *domainp);
I wonder if we should consider adding these convenience APIs to the official
libvirt API. What you're doing here would be needed in any C app that relies
on clenaup functions.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|