1 Return-Path: <kaz.rag@gmail.com>
\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 3A121429E27
\r
6 for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 13:58:52 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id Gm2Eqqc6Svmm for <notmuch@notmuchmail.org>;
\r
17 Fri, 30 Dec 2011 13:58:51 -0800 (PST)
\r
18 Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com
\r
19 [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id DFEE6429E26
\r
22 for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 13:58:48 -0800 (PST)
\r
23 Received: by mail-qy0-f181.google.com with SMTP id a6so10990719qch.26
\r
24 for <notmuch@notmuchmail.org>; Fri, 30 Dec 2011 13:58:48 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
27 bh=q8ACQ1SUbnoNz7lin/78tReMG7lcLgM8Phr5YTlxAu0=;
\r
28 b=rOmTW576y5vjRRJmJtFdA0PxjpwTkpVhkjvOq74xxDeaj0z9JVhFQlohVz1O/AochV
\r
29 ckPyI8Ld7gZICpfCDuom1bUEl5xjLmPFh92aEqMwLhEbD5fVl6HZnyLvjpnxv0mrMrVG
\r
30 Gm4DLd+M8uARvIc6RS0AaxOIrjfoWVYupjkGw=
\r
31 Received: by 10.229.135.208 with SMTP id o16mr14702857qct.15.1325282328697;
\r
32 Fri, 30 Dec 2011 13:58:48 -0800 (PST)
\r
33 Received: from localhost.localdomain (201-1-35-143.dsl.telesp.net.br.
\r
35 by mx.google.com with ESMTPS id z1sm74916346qao.1.2011.12.30.13.58.47
\r
36 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Fri, 30 Dec 2011 13:58:48 -0800 (PST)
\r
38 From: Kazuo Teramoto <kaz.rag@gmail.com>
\r
39 To: notmuch@notmuchmail.org,
\r
40 David Bremner <david@tethera.net>
\r
41 Subject: [PATCH 1/2] lib: Remove unnecessary checks when calling g_mime_init
\r
42 Date: Fri, 30 Dec 2011 19:58:09 -0200
\r
43 Message-Id: <1325282290-29565-2-git-send-email-kaz.rag@gmail.com>
\r
44 X-Mailer: git-send-email 1.7.8.1
\r
45 In-Reply-To: <1325282290-29565-1-git-send-email-kaz.rag@gmail.com>
\r
46 References: <877h1e6r9d.fsf@zancas.localnet>
\r
47 <1325282290-29565-1-git-send-email-kaz.rag@gmail.com>
\r
48 X-BeenThere: notmuch@notmuchmail.org
\r
49 X-Mailman-Version: 2.1.13
\r
51 List-Id: "Use and development of the notmuch mail system."
\r
52 <notmuch.notmuchmail.org>
\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
56 List-Post: <mailto:notmuch@notmuchmail.org>
\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
60 X-List-Received-Date: Fri, 30 Dec 2011 21:58:52 -0000
\r
62 g_mime_init already check for multiple initializations.
\r
64 lib/index.cc | 4 ----
\r
65 lib/message-file.c | 4 ----
\r
66 2 files changed, 0 insertions(+), 8 deletions(-)
\r
68 diff --git a/lib/index.cc b/lib/index.cc
\r
69 index d8f8b2b..6764929 100644
\r
72 @@ -419,12 +419,8 @@ _notmuch_message_index_file (notmuch_message_t *message,
\r
74 const char *from, *subject;
\r
75 notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
\r
76 - static int initialized = 0;
\r
78 - if (! initialized) {
\r
83 file = fopen (filename, "r");
\r
85 diff --git a/lib/message-file.c b/lib/message-file.c
\r
86 index 915aba8..78c7820 100644
\r
87 --- a/lib/message-file.c
\r
88 +++ b/lib/message-file.c
\r
89 @@ -223,14 +223,10 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,
\r
90 char *header, *decoded_value, *header_sofar, *combined_header;
\r
91 const char *s, *colon;
\r
92 int match, newhdr, hdrsofar, is_received;
\r
93 - static int initialized = 0;
\r
95 is_received = (strcmp(header_desired,"received") == 0);
\r
97 - if (! initialized) {
\r
102 message->parsing_started = 1;
\r