aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Chris Wilson <chris@chris-wilson.co.uk>2009-11-21 23:14:39 +0000
committerGravatar Carl Worth <cworth@cworth.org>2009-11-22 05:26:59 +0100
commit3e4ab913db33991177f8da7ae2d6ce7d11791678 (patch)
tree3354279d89e84ec9ab7160c2c5d9c4ec9e387316
parent1266d8511e9adc7296ec4ddbf609dec824b4c94f (diff)
lib/database.cc: coding style
Carl claims he must have been distracted when he wrote this... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--lib/database.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/database.cc b/lib/database.cc
index f4a445aa..2c90019c 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);
@@ -295,13 +298,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++;
}
}
@@ -518,7 +522,7 @@ notmuch_database_open (const char *path,
error.get_msg().c_str());
notmuch = NULL;
}
-
+
DONE:
if (notmuch_path)
free (notmuch_path);