qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-trivial@nongnu.org, jcody@redhat.com, qemu-devel@nongnu.org,
	rjones@redhat.com
Subject: Re: [Qemu-devel] [PATCH] block/ssh: remove dead code
Date: Tue, 15 Sep 2015 10:31:24 +0800	[thread overview]
Message-ID: <20150915023124.GF14016@ad.nay.redhat.com> (raw)
In-Reply-To: <1442229154-2052-1-git-send-email-pbonzini@redhat.com>

On Mon, 09/14 13:12, Paolo Bonzini wrote:
> The "err" label cannot be reached with qp != NULL.  Remove the free-ing
> of qp and avoid future regressions by removing the initializer.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  block/ssh.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/block/ssh.c b/block/ssh.c
> index 8d06739..d35b51f 100644
> --- a/block/ssh.c
> +++ b/block/ssh.c
> @@ -193,7 +193,7 @@ sftp_error_report(BDRVSSHState *s, const char *fs, ...)
>  static int parse_uri(const char *filename, QDict *options, Error **errp)
>  {
>      URI *uri = NULL;
> -    QueryParams *qp = NULL;
> +    QueryParams *qp;
>      int i;
>  
>      uri = uri_parse(filename);
> @@ -249,9 +249,6 @@ static int parse_uri(const char *filename, QDict *options, Error **errp)
>      return 0;
>  
>   err:
> -    if (qp) {
> -      query_params_free(qp);
> -    }
>      if (uri) {
>        uri_free(uri);
>      }
> -- 
> 2.5.0
> 
> 

Reviewed-by: Fam Zheng <famz@redhat.com>

  parent reply	other threads:[~2015-09-15  2:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 11:12 [Qemu-devel] [PATCH] block/ssh: remove dead code Paolo Bonzini
2015-09-14 11:18 ` Richard W.M. Jones
2015-09-15  2:31 ` Fam Zheng [this message]
2015-09-16 10:29 ` Michael Tokarev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150915023124.GF14016@ad.nay.redhat.com \
    --to=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rjones@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).