From: Peter Krempa Date: Tue, 26 Feb 2019 16:46:57 +0000 (+0100) Subject: util: alloc: Clarify docs for VIR_DEFINE_AUTOCLEAN_FUNC X-Git-Tag: v5.2.0-rc1~412 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=786f47414d7631031b3575c9570cdd6fbe4af8e9;p=thirdparty%2Flibvirt.git util: alloc: Clarify docs for VIR_DEFINE_AUTOCLEAN_FUNC Document that @func must take pointer to @type. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/src/util/viralloc.h b/src/util/viralloc.h index 518419e694..226d4d9b64 100644 --- a/src/util/viralloc.h +++ b/src/util/viralloc.h @@ -623,8 +623,8 @@ void virAllocTestHook(void (*func)(int, void*), void *data); * @func: cleanup function to be automatically called * * This macro defines a function for automatic clearing of - * resources in a stack'd variable of type @type. This newly - * defined function works as a necessary wrapper around @func. + * resources in a stack'd variable of type @type. Note that @func must + * take pointer to @type. */ # define VIR_DEFINE_AUTOCLEAN_FUNC(type, func) \ static inline void VIR_AUTOCLEAN_FUNC_NAME(type)(type *_ptr) \