Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / d0 / d46f92d773c8ba5cf0fee53c45ec61cc57adf5
1 Return-Path: <bremner@tethera.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id AEE056DE0924\r
6  for <notmuch@notmuchmail.org>; Sun, 27 Sep 2015 08:33:54 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.109\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.109 tagged_above=-999 required=5 tests=[AWL=0.109]\r
12  autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id 94tnwe03t3R0 for <notmuch@notmuchmail.org>;\r
16  Sun, 27 Sep 2015 08:33:53 -0700 (PDT)\r
17 Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224])\r
18  by arlo.cworth.org (Postfix) with ESMTPS id CDA496DE025E\r
19  for <notmuch@notmuchmail.org>; Sun, 27 Sep 2015 08:33:52 -0700 (PDT)\r
20 Received: from remotemail by gitolite.debian.net with local (Exim 4.80)\r
21  (envelope-from <bremner@tethera.net>)\r
22  id 1ZgDwq-0008Dp-1Q; Sun, 27 Sep 2015 15:33:08 +0000\r
23 Received: (nullmailer pid 11929 invoked by uid 1000); Sun, 27 Sep 2015\r
24  15:32:11 -0000\r
25 From: David Bremner <david@tethera.net>\r
26 To: notmuch@notmuchmail.org\r
27 Subject: [Patch v4 1/9] lib: move query variable to function scope\r
28 Date: Sun, 27 Sep 2015 12:31:55 -0300\r
29 Message-Id: <1443367923-11867-2-git-send-email-david@tethera.net>\r
30 X-Mailer: git-send-email 2.5.3\r
31 In-Reply-To: <1443367923-11867-1-git-send-email-david@tethera.net>\r
32 References: <1443367923-11867-1-git-send-email-david@tethera.net>\r
33 X-BeenThere: notmuch@notmuchmail.org\r
34 X-Mailman-Version: 2.1.18\r
35 Precedence: list\r
36 List-Id: "Use and development of the notmuch mail system."\r
37  <notmuch.notmuchmail.org>\r
38 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
39  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
41 List-Post: <mailto:notmuch@notmuchmail.org>\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
43 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
44  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
45 X-List-Received-Date: Sun, 27 Sep 2015 15:33:54 -0000\r
46 \r
47 This is a prelude to deallocating it (if necessary) on the error path.\r
48 ---\r
49  lib/database.cc | 6 ++++--\r
50  1 file changed, 4 insertions(+), 2 deletions(-)\r
51 \r
52 diff --git a/lib/database.cc b/lib/database.cc\r
53 index 6d0e5a6..dcfad8c 100644\r
54 --- a/lib/database.cc\r
55 +++ b/lib/database.cc\r
56 @@ -1372,6 +1372,7 @@ notmuch_database_upgrade (notmuch_database_t *notmuch,\r
57      enum _notmuch_features target_features, new_features;\r
58      notmuch_status_t status;\r
59      notmuch_private_status_t private_status;\r
60 +    notmuch_query_t *query = NULL;\r
61      unsigned int count = 0, total = 0;\r
62  \r
63      status = _notmuch_database_ensure_writable (notmuch);\r
64 @@ -1408,7 +1409,7 @@ notmuch_database_upgrade (notmuch_database_t *notmuch,\r
65      if (new_features &\r
66         (NOTMUCH_FEATURE_FILE_TERMS | NOTMUCH_FEATURE_BOOL_FOLDER |\r
67          NOTMUCH_FEATURE_LAST_MOD)) {\r
68 -       notmuch_query_t *query = notmuch_query_create (notmuch, "");\r
69 +       query = notmuch_query_create (notmuch, "");\r
70         total += notmuch_query_count_messages (query);\r
71         notmuch_query_destroy (query);\r
72      }\r
73 @@ -1436,11 +1437,12 @@ notmuch_database_upgrade (notmuch_database_t *notmuch,\r
74      if (new_features &\r
75         (NOTMUCH_FEATURE_FILE_TERMS | NOTMUCH_FEATURE_BOOL_FOLDER |\r
76          NOTMUCH_FEATURE_LAST_MOD)) {\r
77 -       notmuch_query_t *query = notmuch_query_create (notmuch, "");\r
78         notmuch_messages_t *messages;\r
79         notmuch_message_t *message;\r
80         char *filename;\r
81  \r
82 +       query = notmuch_query_create (notmuch, "");\r
83 +\r
84         /* XXX: this should use the _st version, but needs an error\r
85            path */\r
86         for (messages = notmuch_query_search_messages (query);\r
87 -- \r
88 2.5.3\r
89 \r