unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: notmuch@notmuchmail.org
Subject: [PATCH] lib/database.cc: coding style
Date: Sat, 21 Nov 2009 23:14:39 +0000	[thread overview]
Message-ID: <1258845279-24291-1-git-send-email-chris@chris-wilson.co.uk> (raw)

Carl claims he must have been distracted when he wrote this...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 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

             reply	other threads:[~2009-11-21 23:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-21 23:14 Chris Wilson [this message]
2009-11-22  4:27 ` [PATCH] lib/database.cc: coding style Carl Worth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1258845279-24291-1-git-send-email-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).