From 636b8a4b5fb378dd0dcbc819b225fffc51365e40 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Wed, 16 Oct 2019 13:35:14 +0200 Subject: [PATCH] internal: delete VIR_RETURN_PTR MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Remove the macro definition to prevent its usage in new code. Signed-off-by: Ján Tomko Reviewed-by: Michal Privoznik --- src/internal.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/internal.h b/src/internal.h index 25df0560af..722cdbc57c 100644 --- a/src/internal.h +++ b/src/internal.h @@ -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 -- 2.47.2