From patchwork Sat Jul 31 16:23:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: malc X-Patchwork-Id: 60436 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 27A63B70A4 for ; Sun, 1 Aug 2010 02:25:26 +1000 (EST) Received: from localhost ([127.0.0.1]:36386 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfEsE-0004ao-S0 for incoming@patchwork.ozlabs.org; Sat, 31 Jul 2010 12:25:22 -0400 Received: from [140.186.70.92] (port=42605 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfEre-0004ZJ-NR for qemu-devel@nongnu.org; Sat, 31 Jul 2010 12:24:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfErd-0001BA-20 for qemu-devel@nongnu.org; Sat, 31 Jul 2010 12:24:46 -0400 Received: from fe02x03-cgp.akado.ru ([77.232.31.165]:62881 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfErc-0001AK-RX for qemu-devel@nongnu.org; Sat, 31 Jul 2010 12:24:45 -0400 Received: from [10.0.66.9] (HELO localhost.localdomain) by fe02-cgp.akado.ru (CommuniGate Pro SMTP 5.2.13) with ESMTP id 155479035; Sat, 31 Jul 2010 20:24:38 +0400 From: malc To: qemu-devel@nongnu.org Date: Sat, 31 Jul 2010 20:23:34 +0400 Message-Id: <1280593414-2232-1-git-send-email-av1474@comtv.ru> X-Mailer: git-send-email 1.6.6.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] Drop braces around single statement rule X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org History has shown that this particular rule is unenforcable. Signed-off-by: malc --- CODING_STYLE | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CODING_STYLE b/CODING_STYLE index 92036f3..e0b5376 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -54,16 +54,17 @@ readers that they are seeing a wrapped version; otherwise avoid this prefix. 4. Block structure -Every indented statement is braced; even if the block contains just one -statement. The opening brace is on the line that contains the control -flow statement that introduces the new block; the closing brace is on the -same line as the else keyword, or on a line by itself if there is no else -keyword. Example: +The opening brace is on the line that contains the control flow +statement that introduces the new block; the closing brace is on the +same line as the else keyword, or on a line by itself if there is no +else keyword. Example: if (a == 5) { printf("a was 5.\n"); + do5stuff(); } else if (a == 6) { printf("a was 6.\n"); + do6stuff(); } else { printf("a was something else entirely.\n"); }