提交 636b8a4b 编写于 作者: J Ján Tomko

internal: delete VIR_RETURN_PTR

Remove the macro definition to prevent its usage in new code.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 483a14f8
......@@ -225,21 +225,6 @@
(b) = NULL; \
} while (0)
/**
* VIR_RETURN_PTR:
* @ret: pointer to return
*
* Returns value of @ret while clearing @ret. This ensures that pointers
* freed by using VIR_AUTOPTR can be easily passed back to the caller without
* any temporary variable. @ptr is evaluated more than once.
*/
#define VIR_RETURN_PTR(ptr) \
do { \
typeof(ptr) virTemporaryReturnPointer = (ptr); \
(ptr) = NULL; \
return virTemporaryReturnPointer; \
} while (0)
/**
* virCheckFlags:
* @supported: an OR'ed set of supported flags
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册