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

Re: [libvirt] [PATCH] Fix more printf("%s", NULL) usage



john levon sun com wrote:
> diff --git a/src/libvirt.c b/src/libvirt.c
> --- a/src/libvirt.c
> +++ b/src/libvirt.c
> @@ -2871,7 +2871,9 @@ virDomainMigratePrepare (virConnectPtr d
>                             const char *dname,
>                             unsigned long bandwidth)
>  {
> -    DEBUG("dconn=%p, cookie=%p, cookielen=%p, uri_in=%s, uri_out=%p, flags=%lu, dname=%s, bandwidth=%lu", dconn, cookie, cookielen, uri_in, uri_out, flags, dname, bandwidth);
> +    VIR_DEBUG("dconn=%p, cookie=%p, cookielen=%p, uri_in=%s, uri_out=%p, "
> +        "flags=%lu, dname=%s, bandwidth=%lu", dconn, cookie, cookielen,
> +        NULLSTR(uri_in), uri_out, flags, NULLSTR(dname), bandwidth);
>
>      virResetLastError();

ACK.

Limited-width side-by-side comparators thank you for
splitting the long lines.

Thought note that we like continuation lines
to be aligned with the opening parenthesis, i.e.,

    VIR_DEBUG("dconn=%p, cookie=%p, cookielen=%p, uri_in=%s, uri_out=%p, "
              "flags=%lu, dname=%s, bandwidth=%lu", dconn, cookie, cookielen,
              NULLSTR(uri_in), uri_out, flags, NULLSTR(dname), bandwidth);

because that's what most automatic indenters do.


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