internal: Introduce VIR_RETURN_PTR
internal: Introduce VIR_RETURN_PTR

With the introduction of more and more internal data types which support
VIR_AUTOPTR it's becoming common to see the following pattern:

  VIR_AUTOPTR(virSomething) some = NULL
  virSomethingPtr ret = NULL;

  ... (ret is not touched ) ...

  VIR_STEAL_PTR(ret, some);
  return ret;

This patch introduces a macro named VIR_RETURN_PTR which returns the
pointer directly without the need for an explicitly defined return
variable and use of VIR_STEAL_PTR. Internally obviously a temporary
pointer is created to allow setting the original pointer to NULL so that
the VIR_AUTOPTR function does not free the memory which we want to
actually return.

The name of the temporary variable is deliberately long and complex to
minimize the possibility of collision.

Signed-off-by: Peter Krempa <2cf5c04c61aa466e4a47bfedc747d17279c72ffc@redhat.com>
Reviewed-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>

fabianfreyer/libvirt,libvirt/libvirt,zippy2/libvirt,fabianfreyer/libvirt,zippy2/libvirt,crobinso/libvirt,jfehlig/libvirt,andreabolognani/libvirt,nertpinx/libvirt,andreabolognani/libvirt,olafhering/libvirt,jfehlig/libvirt,zippy2/libvirt,nertpinx/libvirt,andreabolognani/libvirt,eskultety/libvirt,jardasgit/libvirt,olafhering/libvirt,jardasgit/libvirt,libvirt/libvirt,nertpinx/libvirt,olafhering/libvirt,jfehlig/libvirt,eskultety/libvirt,zippy2/libvirt,libvirt/libvirt,jfehlig/libvirt,eskultety/libvirt,eskultety/libvirt,jardasgit/libvirt,nertpinx/libvirt,olafhering/libvirt,libvirt/libvirt,andreabolognani/libvirt,crobinso/libvirt,andreabolognani/libvirt,eskultety/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,crobinso/libvirt,jardasgit/libvirt,jardasgit/libvirt,crobinso/libvirt,fabianfreyer/libvirt,nertpinx/libvirt