1 Return-Path: <Sebastian@SSpaeth.de>
\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 422334196F0
\r
6 for <notmuch@notmuchmail.org>; Tue, 27 Apr 2010 05:57:33 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9] autolearn=ham
\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 IhpHCIYLA5Ja for <notmuch@notmuchmail.org>;
\r
16 Tue, 27 Apr 2010 05:57:32 -0700 (PDT)
\r
17 Received: from homiemail-a13.g.dreamhost.com (caiajhbdcaib.dreamhost.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id 60E17431FC1
\r
20 for <notmuch@notmuchmail.org>; Tue, 27 Apr 2010 05:57:32 -0700 (PDT)
\r
21 Received: from localhost.localdomain (mtec-hg-docking-1-dhcp-204.ethz.ch
\r
22 [129.132.133.204]) (Authenticated sender: sebastian@sspaeth.de)
\r
23 by homiemail-a13.g.dreamhost.com (Postfix) with ESMTPA id 93A686A806F;
\r
24 Tue, 27 Apr 2010 05:57:30 -0700 (PDT)
\r
25 From: Sebastian Spaeth <Sebastian@SSpaeth.de>
\r
26 To: Notmuch developer list <notmuch@notmuchmail.org>
\r
27 Subject: [PATCH] Rename already used counter var i
\r
28 Date: Tue, 27 Apr 2010 14:57:25 +0200
\r
29 Message-Id: <1272373045-29268-1-git-send-email-Sebastian@SSpaeth.de>
\r
30 X-Mailer: git-send-email 1.7.0.4
\r
31 In-Reply-To: <87tyqxmdw6.fsf@yoom.home.cworth.org>
\r
32 References: <87tyqxmdw6.fsf@yoom.home.cworth.org>
\r
33 X-BeenThere: notmuch@notmuchmail.org
\r
34 X-Mailman-Version: 2.1.13
\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: Tue, 27 Apr 2010 12:57:33 -0000
\r
47 From: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
\r
49 i is already used in a for loop at this point, so using i here again
\r
50 broke notmuch-reply (it would just hang). Use j instead of i here.
\r
52 Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
\r
54 Aneesh noticed this bug and provided a fix for it. IMO it warrants a 0.3.1
\r
55 release. notmuch-reply hanging indefinitely is not going to make grumpy
\r
56 editors happy. Also despite a documentation blurb above the main snippet of
\r
57 code, I find it pretty much black magic what is being done here. But then
\r
58 I don't really know C....
\r
60 notmuch-reply.c | 8 ++++----
\r
61 1 files changed, 4 insertions(+), 4 deletions(-)
\r
63 diff --git a/notmuch-reply.c b/notmuch-reply.c
\r
64 index 333e945..fd1de3b 100644
\r
65 --- a/notmuch-reply.c
\r
66 +++ b/notmuch-reply.c
\r
67 @@ -317,7 +317,7 @@ guess_from_received_header (notmuch_config_t *config, notmuch_message_t *message
\r
70 const char *delim=". \t";
\r
71 - size_t i,other_len;
\r
72 + size_t i,j,other_len;
\r
74 const char *to_headers[] = {"Envelope-to", "X-Original-To"};
\r
76 @@ -348,10 +348,10 @@ guess_from_received_header (notmuch_config_t *config, notmuch_message_t *message
\r
80 - for (i = 0; i < other_len; i++)
\r
81 - if (strcasestr (tohdr, other[i])) {
\r
82 + for (j = 0; j < other_len; j++)
\r
83 + if (strcasestr (tohdr, other[j])) {
\r