]> xenbits.xensource.com Git - libvirt.git/commitdiff
internal: delete VIR_RETURN_PTR
authorJán Tomko <jtomko@redhat.com>
Wed, 16 Oct 2019 11:35:14 +0000 (13:35 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 16 Oct 2019 13:59:41 +0000 (15:59 +0200)
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>
src/internal.h

index 25df0560af4caeb23e589f3965eb1073ba891c83..722cdbc57c1b109b293242ab7d42a1d1f579ba6a 100644 (file)
         (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