1 Return-Path: <amdragon@mit.edu>
\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 olra.theworths.org (Postfix) with ESMTP id EBFA3429E38
\r
6 for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 20:45:14 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id omNTgsoUOovN for <notmuch@notmuchmail.org>;
\r
16 Fri, 30 Dec 2011 20:45:14 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id E20D8429E2F
\r
20 for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 20:45:13 -0800 (PST)
\r
21 X-AuditID: 1209190c-b7fad6d000000920-06-4efe93587477
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id CC.57.02336.8539EFE4; Fri, 30 Dec 2011 23:45:12 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id pBV4jBDn030189;
\r
27 Fri, 30 Dec 2011 23:45:11 -0500
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pBV4jAOc012937
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Fri, 30 Dec 2011 23:45:11 -0500 (EST)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1RgqpK-0006pc-KF; Fri, 30 Dec 2011 23:45:50 -0500
\r
37 Date: Fri, 30 Dec 2011 23:45:50 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Kazuo Teramoto <kaz.rag@gmail.com>
\r
40 Subject: Re: [PATCH 1/2] lib: Remove unnecessary checks when calling
\r
42 Message-ID: <20111231044550.GL30150@mit.edu>
\r
43 References: <877h1e6r9d.fsf@zancas.localnet>
\r
44 <1325282290-29565-1-git-send-email-kaz.rag@gmail.com>
\r
45 <1325282290-29565-2-git-send-email-kaz.rag@gmail.com>
\r
47 Content-Type: text/plain; charset=us-ascii
\r
48 Content-Disposition: inline
\r
49 In-Reply-To: <1325282290-29565-2-git-send-email-kaz.rag@gmail.com>
\r
50 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
51 X-Brightmail-Tracker:
\r
52 H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42IR4hRV1o2Y/M/PYNpMOYsbrd2MFt/mPmCy
\r
53 uH5zJrMDs8fOWXfZPZ6tusXsseXQe+YA5igum5TUnMyy1CJ9uwSujCMXjrMWXOGuOHHxKGMD
\r
54 40eOLkZODgkBE4n+8zfYIWwxiQv31rOB2EIC+xgl+l+mdzFyAdkbGCWurH3NBuGcZJK4+6wF
\r
55 qmoJo8St+fEgNouAqsSr32tZQWw2AQ2JbfuXM4LYIgJqEq2bz4HVMwvYSSz/9ZgJxBYWCJLo
\r
56 vDwdrJ5XQEficsMSVogFcxglNvRcYoNICEqcnPmEBaJZS+LGv5dAzRxAtrTE8n9gH3AKOEk8
\r
57 3vkUbJeogIrElJPb2CYwCs1C0j0LSfcshO4FjMyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdA31
\r
58 cjNL9FJTSjcxgkNdkmcH45uDSocYBTgYlXh4d77+6yfEmlhWXJl7iFGSg0lJlHf+xH9+QnxJ
\r
59 +SmVGYnFGfFFpTmpxYcYJTiYlUR4eQuAcrwpiZVVqUX5MClpDhYlcV4VrXd+QgLpiSWp2amp
\r
60 BalFMFkZDg4lCd6Jk4AaBYtS01Mr0jJzShDSTBycIMN5gIYngCzmLS5IzC3OTIfIn2JUlBLn
\r
61 zQFpFgBJZJTmwfXCUtErRnGgV4R5+0GqeIBpDK77FdBgJqDB5879AhlckoiQkmpglP/rqPF/
\r
62 WuRcdsaKGS3nz76YZb1wz4qX565qa0dyJn0Knxxczlj96+uJwoZ3NpvfO85fVhp83iDw/b+3
\r
63 os/sjonc51/mEfD0e/HvJx4zA7P9797czTb78MzIrQndfhUTZ3EKFnw3XuHtvexq28dGrjDR
\r
64 uIXcf588Lq2OsEheHnR1/x+Rrn+SHEosxRmJhlrMRcWJAFu9L7kgAwAA
\r
65 Cc: notmuch@notmuchmail.org
\r
66 X-BeenThere: notmuch@notmuchmail.org
\r
67 X-Mailman-Version: 2.1.13
\r
69 List-Id: "Use and development of the notmuch mail system."
\r
70 <notmuch.notmuchmail.org>
\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
74 List-Post: <mailto:notmuch@notmuchmail.org>
\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
77 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
78 X-List-Received-Date: Sat, 31 Dec 2011 04:45:15 -0000
\r
80 Shouldn't we remove the g_mime_init's from this code entirely if we're
\r
81 going to do it in notmuch_database_open?
\r
83 Quoth Kazuo Teramoto on Dec 30 at 7:58 pm:
\r
84 > g_mime_init already check for multiple initializations.
\r
86 > lib/index.cc | 4 ----
\r
87 > lib/message-file.c | 4 ----
\r
88 > 2 files changed, 0 insertions(+), 8 deletions(-)
\r
90 > diff --git a/lib/index.cc b/lib/index.cc
\r
91 > index d8f8b2b..6764929 100644
\r
92 > --- a/lib/index.cc
\r
93 > +++ b/lib/index.cc
\r
94 > @@ -419,12 +419,8 @@ _notmuch_message_index_file (notmuch_message_t *message,
\r
95 > FILE *file = NULL;
\r
96 > const char *from, *subject;
\r
97 > notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
\r
98 > - static int initialized = 0;
\r
100 > - if (! initialized) {
\r
102 > - initialized = 1;
\r
105 > file = fopen (filename, "r");
\r
107 > diff --git a/lib/message-file.c b/lib/message-file.c
\r
108 > index 915aba8..78c7820 100644
\r
109 > --- a/lib/message-file.c
\r
110 > +++ b/lib/message-file.c
\r
111 > @@ -223,14 +223,10 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,
\r
112 > char *header, *decoded_value, *header_sofar, *combined_header;
\r
113 > const char *s, *colon;
\r
114 > int match, newhdr, hdrsofar, is_received;
\r
115 > - static int initialized = 0;
\r
117 > is_received = (strcmp(header_desired,"received") == 0);
\r
119 > - if (! initialized) {
\r
121 > - initialized = 1;
\r
124 > message->parsing_started = 1;
\r