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

Re: [Xen-devel] [PATCH 1/4] libxl: convert to use LOG() macro



On 15/09/15 10:41, Wei Liu wrote:
> @@ -440,15 +436,18 @@ int libxl__domain_rename(libxl__gc *gc, uint32_t domid,
>      if (old_name) {
>          got_old_name = xs_read(ctx->xsh, trans, name_path, &got_old_len);
>          if (!got_old_name) {
> -            LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, errno, "check old 
> name"
> -                            " for domain %"PRIu32" allegedly named `%s'",
> -                            domid, old_name);
> +            LOGEV(ERROR, errno,
> +                  "check old name"" for domain %"PRIu32" allegedly named 
> `%s'",
> +                  domid,
> +                  old_name);

There are a number of entries like this where the number of lines could
be reduced.

> @@ -669,16 +678,22 @@ int libxl_domain_info(libxl_ctx *ctx, libxl_dominfo 
> *info_r,
>                        uint32_t domid) {
>      xc_domaininfo_t xcinfo;
>      int ret;
> +    GC_INIT(ctx);
>  
>      ret = xc_domain_getinfolist(ctx->xch, domid, 1, &xcinfo);
>      if (ret<0) {
> -        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain info list");
> +        LOGE(ERROR, "getting domain info list");
> +        GC_FREE;
>          return ERROR_FAIL;
>      }
> -    if (ret==0 || xcinfo.domain != domid) return ERROR_DOMAIN_NOTFOUND;
> +    if (ret==0 || xcinfo.domain != domid) {
> +       GC_FREE;
> +        return ERROR_DOMAIN_NOTFOUND;
> +    }

Alignment.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.