From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUyQr-00039I-3I for qemu-devel@nongnu.org; Tue, 01 Apr 2014 09:08:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUyQd-0001wr-7I for qemu-devel@nongnu.org; Tue, 01 Apr 2014 09:08:49 -0400 Received: from mail-pd0-x235.google.com ([2607:f8b0:400e:c02::235]:40275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUyQd-0001wW-0s for qemu-devel@nongnu.org; Tue, 01 Apr 2014 09:08:35 -0400 Received: by mail-pd0-f181.google.com with SMTP id p10so9491007pdj.40 for ; Tue, 01 Apr 2014 06:08:34 -0700 (PDT) Message-ID: <533ABA4C.7090001@gmail.com> Date: Tue, 01 Apr 2014 21:08:28 +0800 From: Chen Gang MIME-Version: 1.0 References: <53382B89.9030301@gmail.com> <53382D7F.5080103@gmail.com> <87ha6drzth.fsf@linaro.org> In-Reply-To: <87ha6drzth.fsf@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH trival] vl.c: clean up code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QWxleCBCZW5uw6ll?= Cc: QEMU Developers , aliguori@amazon.com On 04/01/2014 08:36 PM, Alex Bennée wrote: > > Chen Gang writes: > >> Hello Maintainers: >> >> In main switch of main(), it contents several styles for "{...}" code block. >> >> If it is necessary to use unique style within a function, please let me >> know, I will/should clean up it. And also better to tell me which style >> we need choose -- for me, I don't know which style is the best to >> Qemu. > > The correct block style is described in CODING_STYLE Section 4. However > chunks of the code base violate the style guidelines and should be > cleaned up as other fixes are made. > In CODING_STYLE Section 4, has no demo for "{...}" within switch, I guess your meaning is "the demo below is the correct block style for Qemu": switch(...) { case 'x': { char a; ... break; } case 'y': ... break; default: break; } If it is OK, suggest to complete the CODING_STYLE Section 4 with one 'switch' demo. Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed