]> granicus.if.org Git - neomutt/commitdiff
add braces to unclear 'if' statements
authorRichard Russon <rich@flatcap.org>
Wed, 7 Aug 2019 20:57:06 +0000 (21:57 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 19 Aug 2019 23:14:28 +0000 (00:14 +0100)
autocrypt/autocrypt.c
autocrypt/autocrypt_db.c

index 8552379925b60d49ad25209b9e1b9b138c2eff34..bbe0a5f3327b96d55cb462e8f4b654d2e16339d8 100644 (file)
@@ -273,7 +273,9 @@ int mutt_autocrypt_process_autocrypt_header(struct Email *e, struct Envelope *en
   /* 1.1 spec also says to skip multipart/report emails */
   if ((e->content->type == TYPE_MULTIPART) &&
       !(mutt_str_strcasecmp(e->content->subtype, "report")))
+  {
     return 0;
+  }
 
   /* Ignore emails that appear to be more than a week in the future,
    * since they can block all future updates during that time. */
@@ -593,12 +595,14 @@ enum AutocryptRec mutt_autocrypt_ui_recommendation(struct Email *e, char **keyli
     if (mutt_autocrypt_db_peer_get(recip, &peer) <= 0)
     {
       if (keylist)
+      {
         /* L10N:
            %s is an email address.  Autocrypt is scanning for the keyids
            to use to encrypt, but it can't find a valid keyid for this address.
            The message is printed and they are returned to the compose menu.
          */
         mutt_message(_("No (valid) autocrypt key found for %s."), recip->mailbox);
+      }
       goto cleanup;
     }
 
index 38ed48ead8639c4e6f98b7a7399ccc9d9a4a2d08..3746fb4102730bc244a27acdc0d6584236c06a9f 100644 (file)
@@ -273,7 +273,9 @@ int mutt_autocrypt_db_account_get(struct Address *addr, struct AutocryptAccount
                            "FROM account "
                            "WHERE email_addr = ?",
                            -1, SQLITE_PREPARE_PERSISTENT, &AccountGetStmt, NULL) != SQLITE_OK)
+    {
       goto cleanup;
+    }
   }
 
   if (sqlite3_bind_text(AccountGetStmt, 1, norm_addr->mailbox, -1, SQLITE_STATIC) != SQLITE_OK)
@@ -330,7 +332,9 @@ int mutt_autocrypt_db_account_insert(struct Address *addr, const char *keyid,
                            "enabled) "
                            "VALUES (?, ?, ?, ?, ?);",
                            -1, SQLITE_PREPARE_PERSISTENT, &AccountInsertStmt, NULL) != SQLITE_OK)
+    {
       goto cleanup;
+    }
   }
 
   if (sqlite3_bind_text(AccountInsertStmt, 1, norm_addr->mailbox, -1, SQLITE_STATIC) != SQLITE_OK)
@@ -375,7 +379,9 @@ int mutt_autocrypt_db_account_update(struct AutocryptAccount *acct)
                            "enabled = ? "
                            "WHERE email_addr = ?;",
                            -1, SQLITE_PREPARE_PERSISTENT, &AccountUpdateStmt, NULL) != SQLITE_OK)
+    {
       goto cleanup;
+    }
   }
 
   if (sqlite3_bind_text(AccountUpdateStmt, 1, acct->keyid, -1, SQLITE_STATIC) != SQLITE_OK)
@@ -415,7 +421,9 @@ int mutt_autocrypt_db_account_delete(struct AutocryptAccount *acct)
                            "DELETE from account "
                            "WHERE email_addr = ?;",
                            -1, SQLITE_PREPARE_PERSISTENT, &AccountDeleteStmt, NULL) != SQLITE_OK)
+    {
       goto cleanup;
+    }
   }
 
   if (sqlite3_bind_text(AccountDeleteStmt, 1, acct->email_addr, -1, SQLITE_STATIC) != SQLITE_OK)
@@ -460,7 +468,9 @@ int mutt_autocrypt_db_account_get_all(struct AutocryptAccount ***accounts, int *
                          "FROM account "
                          "ORDER BY email_addr",
                          -1, &stmt, NULL) != SQLITE_OK)
+  {
     goto cleanup;
+  }
 
   while ((result = sqlite3_step(stmt)) == SQLITE_ROW)
   {
@@ -553,7 +563,9 @@ int mutt_autocrypt_db_peer_get(struct Address *addr, struct AutocryptPeer **peer
                            "FROM peer "
                            "WHERE email_addr = ?",
                            -1, SQLITE_PREPARE_PERSISTENT, &PeerGetStmt, NULL) != SQLITE_OK)
+    {
       goto cleanup;
+    }
   }
 
   if (sqlite3_bind_text(PeerGetStmt, 1, norm_addr->mailbox, -1, SQLITE_STATIC) != SQLITE_OK)
@@ -615,7 +627,9 @@ int mutt_autocrypt_db_peer_insert(struct Address *addr, struct AutocryptPeer *pe
                            "gossip_keydata) "
                            "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);",
                            -1, SQLITE_PREPARE_PERSISTENT, &PeerInsertStmt, NULL) != SQLITE_OK)
+    {
       goto cleanup;
+    }
   }
 
   if (sqlite3_bind_text(PeerInsertStmt, 1, norm_addr->mailbox, -1, SQLITE_STATIC) != SQLITE_OK)
@@ -672,7 +686,9 @@ int mutt_autocrypt_db_peer_update(struct AutocryptPeer *peer)
                            "gossip_keydata = ? "
                            "WHERE email_addr = ?;",
                            -1, SQLITE_PREPARE_PERSISTENT, &PeerUpdateStmt, NULL) != SQLITE_OK)
+    {
       goto cleanup;
+    }
   }
 
   if (sqlite3_bind_int64(PeerUpdateStmt, 1, peer->last_seen) != SQLITE_OK)
@@ -753,7 +769,9 @@ int mutt_autocrypt_db_peer_history_insert(struct Address *addr,
                            "VALUES (?, ?, ?, ?);",
                            -1, SQLITE_PREPARE_PERSISTENT,
                            &PeerHistoryInsertStmt, NULL) != SQLITE_OK)
+    {
       goto cleanup;
+    }
   }
 
   if (sqlite3_bind_text(PeerHistoryInsertStmt, 1, norm_addr->mailbox, -1, SQLITE_STATIC) != SQLITE_OK)
@@ -828,22 +846,32 @@ int mutt_autocrypt_db_gossip_history_insert(struct Address *addr,
                            "VALUES (?, ?, ?, ?, ?);",
                            -1, SQLITE_PREPARE_PERSISTENT,
                            &GossipHistoryInsertStmt, NULL) != SQLITE_OK)
+    {
       goto cleanup;
+    }
   }
 
   if (sqlite3_bind_text(GossipHistoryInsertStmt, 1, norm_addr->mailbox, -1,
                         SQLITE_STATIC) != SQLITE_OK)
+  {
     goto cleanup;
+  }
   if (sqlite3_bind_text(GossipHistoryInsertStmt, 2, gossip_hist->sender_email_addr,
                         -1, SQLITE_STATIC) != SQLITE_OK)
+  {
     if (sqlite3_bind_text(GossipHistoryInsertStmt, 3, gossip_hist->email_msgid,
                           -1, SQLITE_STATIC) != SQLITE_OK)
+    {
       goto cleanup;
+    }
+  }
   if (sqlite3_bind_int64(GossipHistoryInsertStmt, 4, gossip_hist->timestamp) != SQLITE_OK)
     goto cleanup;
   if (sqlite3_bind_text(GossipHistoryInsertStmt, 5, gossip_hist->gossip_keydata,
                         -1, SQLITE_STATIC) != SQLITE_OK)
+  {
     goto cleanup;
+  }
 
   if (sqlite3_step(GossipHistoryInsertStmt) != SQLITE_DONE)
     goto cleanup;