From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhDFQ-0006XX-Aa for qemu-devel@nongnu.org; Thu, 23 Oct 2014 03:55:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhDFL-0000z4-EC for qemu-devel@nongnu.org; Thu, 23 Oct 2014 03:55:52 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:33813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhDFK-0000wk-M5 for qemu-devel@nongnu.org; Thu, 23 Oct 2014 03:55:47 -0400 Message-ID: <5448B45D.2080904@huawei.com> Date: Thu, 23 Oct 2014 15:55:09 +0800 From: Gonglei MIME-Version: 1.0 References: <1414042783-2180-1-git-send-email-arei.gonglei@huawei.com> <1414042783-2180-4-git-send-email-arei.gonglei@huawei.com> <5448A992.4050600@msgid.tls.msk.ru> In-Reply-To: <5448A992.4050600@msgid.tls.msk.ru> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/3] vnc: remove superfluous DisplayState *ds parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: "Huangpeng (Peter)" , "Huangweidong (C)" , "qemu-devel@nongnu.org" , "kraxel@redhat.com" 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