Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0F0E0431FBF for ; Sat, 21 Nov 2009 15:14:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sCHZv7+vcFbU for ; Sat, 21 Nov 2009 15:14:52 -0800 (PST) Received: from azsmga102.ch.intel.com (mga12.intel.com [143.182.124.36]) by olra.theworths.org (Postfix) with ESMTP id DB7D5431FBC for ; Sat, 21 Nov 2009 15:14:51 -0800 (PST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 21 Nov 2009 15:14:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,264,1257148800"; d="scan'208";a="214296817" Received: from unknown (HELO localhost.localdomain) ([10.255.16.190]) by azsmga001.ch.intel.com with ESMTP; 21 Nov 2009 15:14:42 -0800 From: Chris Wilson To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 23:14:39 +0000 Message-Id: <1258845279-24291-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.3 Subject: [notmuch] [PATCH] lib/database.cc: coding style X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Nov 2009 23:14:53 -0000 Carl claims he must have been distracted when he wrote this... Signed-off-by: Chris Wilson --- lib/database.cc | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 207246c..0f95aa1 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -147,17 +147,20 @@ _find_prefix (const char *name) { unsigned int i; - for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_INTERNAL); i++) + for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_INTERNAL); i++) { if (strcmp (name, BOOLEAN_PREFIX_INTERNAL[i].name) == 0) return BOOLEAN_PREFIX_INTERNAL[i].prefix; + } - for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_EXTERNAL); i++) + for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_EXTERNAL); i++) { if (strcmp (name, BOOLEAN_PREFIX_EXTERNAL[i].name) == 0) return BOOLEAN_PREFIX_EXTERNAL[i].prefix; + } - for (i = 0; i < ARRAY_SIZE (PROBABILISTIC_PREFIX); i++) + for (i = 0; i < ARRAY_SIZE (PROBABILISTIC_PREFIX); i++) { if (strcmp (name, PROBABILISTIC_PREFIX[i].name) == 0) return PROBABILISTIC_PREFIX[i].prefix; + } INTERNAL_ERROR ("No prefix exists for '%s'\n", name); @@ -293,13 +296,14 @@ skip_space_and_comments (const char **str) int nesting = 1; s++; while (*s && nesting) { - if (*s == '(') + if (*s == '(') { nesting++; - else if (*s == ')') + } else if (*s == ')') { nesting--; - else if (*s == '\\') + } else if (*s == '\\') { if (*(s+1)) s++; + } s++; } } @@ -508,7 +512,7 @@ notmuch_database_open (const char *path) error.get_msg().c_str()); notmuch = NULL; } - + DONE: if (notmuch_path) free (notmuch_path); -- 1.6.5.3