[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]