From: Gonglei <arei.gonglei@huawei.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: "Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
"Huangweidong (C)" <weidong.huang@huawei.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"kraxel@redhat.com" <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 3/3] vnc: remove superfluous DisplayState *ds parameter
Date: Thu, 23 Oct 2014 15:55:09 +0800 [thread overview]
Message-ID: <5448B45D.2080904@huawei.com> (raw)
In-Reply-To: <5448A992.4050600@msgid.tls.msk.ru>
On 2014/10/23 15:09, Michael Tokarev wrote:
> On 10/23/2014 09:39 AM, arei.gonglei@huawei.com wrote:
> []
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -4318,7 +4318,7 @@ int main(int argc, char **argv, char **envp)
>> if (vnc_display) {
>> Error *local_err = NULL;
>> vnc_display_init(ds);
>> - vnc_display_open(ds, vnc_display, &local_err);
>> + vnc_display_open(vnc_display, &local_err);
>> if (local_err != NULL) {
>
> So why do you make the two display-initing functions assymetric?
> Why one of them expects a `ds' argument (it is called from just
> one place, and this is THE place), while you remove this arg from
> another?
>
> Maybe we should remove the ds arg from both (and clean up the
> variable in question from main() too -- why it is declared at
> the start of main() anyway, instead of this very place like
> local_err is?)
>
Hmm. I notice Gerd's patch had done this clean work:
http://lists.nongnu.org/archive/html/qemu-devel/2014-10/msg01618.html
Maybe I should drop this patch. Thanks.
Best regards,
-Gonglei
next prev parent reply other threads:[~2014-10-23 7:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 5:39 [Qemu-devel] [PATCH 0/3] vnc: trivial problem and memory leak fix arei.gonglei
2014-10-23 5:39 ` [Qemu-devel] [PATCH 1/3] vnc: remove superfluous vnc_display_close() arei.gonglei
2014-10-23 7:09 ` Michael Tokarev
2014-10-23 7:40 ` Gonglei
2014-10-23 5:39 ` [Qemu-devel] [PATCH 2/3] vnc: fix memory leak at vnc_display_open arei.gonglei
2014-10-23 5:39 ` [Qemu-devel] [PATCH 3/3] vnc: remove superfluous DisplayState *ds parameter arei.gonglei
2014-10-23 7:09 ` Michael Tokarev
2014-10-23 7:55 ` Gonglei [this message]
2014-10-23 8:08 ` [Qemu-devel] [PATCH 0/3] vnc: trivial problem and memory leak fix Gerd Hoffmann
2014-10-23 8:19 ` Gonglei
2014-10-23 12:16 ` Gerd Hoffmann
2014-10-23 12:27 ` Gonglei
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=5448B45D.2080904@huawei.com \
--to=arei.gonglei@huawei.com \
--cc=kraxel@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=weidong.huang@huawei.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).