Re: [dbus PATCH 02/18] util: there is no need to mark cleanup functions as inline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 12, 2018 at 05:21:32PM +0100, Pavel Hrdina wrote:
> Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> ---
>  src/util.c | 34 ++++++++++++++++++++++++++++++++++
>  src/util.h | 38 ++++++++------------------------------
>  2 files changed, 42 insertions(+), 30 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>


> -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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux