From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhCWG-000264-R7 for qemu-devel@nongnu.org; Thu, 23 Oct 2014 03:09:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhCWC-0002rC-0s for qemu-devel@nongnu.org; Thu, 23 Oct 2014 03:09:12 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:48169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhCWB-0002r3-P5 for qemu-devel@nongnu.org; Thu, 23 Oct 2014 03:09:07 -0400 Message-ID: <5448A992.4050600@msgid.tls.msk.ru> Date: Thu, 23 Oct 2014 11:09:06 +0400 From: Michael Tokarev 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> In-Reply-To: <1414042783-2180-4-git-send-email-arei.gonglei@huawei.com> 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: arei.gonglei@huawei.com, qemu-devel@nongnu.org Cc: weidong.huang@huawei.com, kraxel@redhat.com, peter.huangpeng@huawei.com 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?) Thanks, /mjt