mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
internal: delete VIR_RETURN_PTR
Remove the macro definition to prevent its usage in new code. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
483a14f871
commit
636b8a4b5f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user