[libvirt] [PATCH 27/30] Remove virConnectPtr from virRaiseErrorFull

Eric Blake eblake at redhat.com
Mon Apr 5 17:39:58 UTC 2010


On 04/04/2010 11:36 AM, Matthias Bolte wrote:
> And from all related macros and functions.

> +++ b/src/util/virterror.c
> @@ -641,7 +641,6 @@ virDispatchError(virConnectPtr conn)
>  
>  /**
>   * virRaiseErrorFull:
> - * @conn: the connection to the hypervisor if available
>   * @filename: filename where error was raised
>   * @funcname: function name where error was raised
>   * @linenr: line number where error was raised
> @@ -660,8 +659,7 @@ virDispatchError(virConnectPtr conn)
>   * immediately if a callback is found and store it for later handling.
>   */
>  void
> -virRaiseErrorFull(virConnectPtr conn ATTRIBUTE_UNUSED,
> -                  const char *filename ATTRIBUTE_UNUSED,
> +virRaiseErrorFull(const char *filename ATTRIBUTE_UNUSED,

Given that the argument was unused, ACK to the patch, and to all the
mechanical fallout.

> +++ b/src/xenapi/xenapi_utils.c
> @@ -378,11 +378,11 @@ xenapiSessionErrorHandle(virConnectPtr conn, virErrorNumber errNum,
>  
>      if (buf == NULL && priv != NULL && priv->session != NULL) {
>          char *ret = returnErrorFromSession(priv->session);
> -        virReportErrorHelper(conn, VIR_FROM_XENAPI, errNum, filename, func, lineno, _("%s"), ret);
> +        virReportErrorHelper(VIR_FROM_XENAPI, errNum, filename, func, lineno, _("%s"), ret);

Unrelated to your patch, but translating just "%s" is fishy.
Translating "%s:" makes sense (some languages prefer to see "%s :"), but
when there is nothing else there, it is a waste.  It looks like we could
add another cleanup patch to the series.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 323 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100405/9effb438/attachment-0001.sig>


More information about the libvir-list mailing list