util: uri: Introduce VIR_AUTOPTR freeing function

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2019-04-04 10:56:31 +02:00
parent e8ef1dd174
commit 46bd9ee7d7

View File

@ -25,6 +25,7 @@
# include "internal.h"
# include "virconf.h"
# include "virautoclean.h"
typedef struct _virURI virURI;
typedef virURI *virURIPtr;
@ -60,6 +61,7 @@ char *virURIFormat(virURIPtr uri)
char *virURIFormatParams(virURIPtr uri);
void virURIFree(virURIPtr uri);
VIR_DEFINE_AUTOPTR_FUNC(virURI, virURIFree);
int virURIResolveAlias(virConfPtr conf, const char *alias, char **uri);
# define VIR_URI_SERVER(uri) ((uri) && (uri)->server ? (uri)->server : "localhost")