Re: [PATCH v4 02/16] Move crypto.c into libutil
[notmuch-archives.git] / 13 / c17202057e45893a6a2fd869c1edb3492ccc45
1 Return-Path: <jani@nikula.org>\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 3B801431FAF\r
6         for <notmuch@notmuchmail.org>; Thu, 17 May 2012 00:47:17 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \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 CebulSJXHkZN for <notmuch@notmuchmail.org>;\r
16         Thu, 17 May 2012 00:47:15 -0700 (PDT)\r
17 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
18         [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 28EF4431FAE\r
21         for <notmuch@notmuchmail.org>; Thu, 17 May 2012 00:47:15 -0700 (PDT)\r
22 Received: by lbbgk8 with SMTP id gk8so1278806lbb.26\r
23         for <notmuch@notmuchmail.org>; Thu, 17 May 2012 00:47:13 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=google.com; s=20120113;\r
26         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
27         :mime-version:content-type:x-gm-message-state;\r
28         bh=F2dp61T4JfihWbyCBxJMKzIYg4q2EY6Q4lSGrFBN8mk=;\r
29         b=eXfEgdXUgdn5eRqtgpagdCda9f0dLkE0oBbU5UCilwMUlhGz6/FtphldWAFoxTVzOW\r
30         Y4RYovgZa5NX5YNEBR4krKOeqTN3yBpxvck3pajCTe4HZBiVhXd6Bd/iXgsUTJUo1g7w\r
31         yadTmLthoKh0XRXz7u6xQ1WrgKDVOCT3L7/fUdB6QTFuBKcAloWv3ONQGkuQOEQEo4Hh\r
32         qohpr93i7RKPPH7RNg3pNSspsG0mFtCnQeFEXG26CnBvbyKO+4SnopaswyLv/WjvwL/C\r
33         GGiPRqhh9HnOXm+8iKcp8VPni1AR7GFnMxfgpHeAxaCJrnaHGJ1M7ci8E7GW+2eS7pJB\r
34         QYAg==\r
35 Received: by 10.112.37.164 with SMTP id z4mr2554077lbj.100.1337240833446;\r
36         Thu, 17 May 2012 00:47:13 -0700 (PDT)\r
37 Received: from localhost (dsl-hkibrasgw4-fe50dc00-68.dhcp.inet.fi.\r
38         [80.220.80.68])\r
39         by mx.google.com with ESMTPS id pi5sm6733290lab.7.2012.05.17.00.47.11\r
40         (version=SSLv3 cipher=OTHER); Thu, 17 May 2012 00:47:12 -0700 (PDT)\r
41 From: Jani Nikula <jani@nikula.org>\r
42 To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
43         Notmuch Mail <notmuch@notmuchmail.org>\r
44 Subject: Re: [PATCH 4/6] cli: intialize crypto structure in show and reply\r
45 In-Reply-To: <1337205359-2444-5-git-send-email-jrollins@finestructure.net>\r
46 References: <1337205359-2444-1-git-send-email-jrollins@finestructure.net>\r
47         <1337205359-2444-2-git-send-email-jrollins@finestructure.net>\r
48         <1337205359-2444-3-git-send-email-jrollins@finestructure.net>\r
49         <1337205359-2444-4-git-send-email-jrollins@finestructure.net>\r
50         <1337205359-2444-5-git-send-email-jrollins@finestructure.net>\r
51 User-Agent: Notmuch/0.13+13~gc259b9a (http://notmuchmail.org) Emacs/23.3.1\r
52         (i686-pc-linux-gnu)\r
53 Date: Thu, 17 May 2012 10:47:07 +0300\r
54 Message-ID: <8762bvi70k.fsf@nikula.org>\r
55 MIME-Version: 1.0\r
56 Content-Type: text/plain; charset=us-ascii\r
57 X-Gm-Message-State:\r
58  ALoCoQn5SbS6ewBw7rpg/F3w+q/SnKJ/MYYEJqaCIWL12lH+jGk2CJsWkTnzSNT0yHvED5nA3yY4\r
59 X-BeenThere: notmuch@notmuchmail.org\r
60 X-Mailman-Version: 2.1.13\r
61 Precedence: list\r
62 List-Id: "Use and development of the notmuch mail system."\r
63         <notmuch.notmuchmail.org>\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
67 List-Post: <mailto:notmuch@notmuchmail.org>\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
71 X-List-Received-Date: Thu, 17 May 2012 07:47:17 -0000\r
72 \r
73 On Thu, 17 May 2012, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
74 > This makes sure it has proper initialization values when it's created.\r
75 \r
76 Please don't do this. It's unnecessary; if one field is initialized with\r
77 a designated initializer, the rest are initialized to zero (or NULL).\r
78 \r
79 BR,\r
80 Jani.\r
81 \r
82 \r
83 > ---\r
84 >  notmuch-reply.c |    5 ++++-\r
85 >  notmuch-show.c  |   10 +++++++++-\r
86 >  2 files changed, 13 insertions(+), 2 deletions(-)\r
87 >\r
88 > diff --git a/notmuch-reply.c b/notmuch-reply.c\r
89 > index 6662adb..3c967a0 100644\r
90 > --- a/notmuch-reply.c\r
91 > +++ b/notmuch-reply.c\r
92 > @@ -673,7 +673,10 @@ notmuch_reply_command (void *ctx, int argc, char *argv[])\r
93 >      char *query_string;\r
94 >      int opt_index, ret = 0;\r
95 >      int (*reply_format_func)(void *ctx, notmuch_config_t *config, notmuch_query_t *query, notmuch_crypto_t *crypto, notmuch_bool_t reply_all);\r
96 > -    notmuch_crypto_t crypto = { .decrypt = FALSE };\r
97 > +    notmuch_crypto_t crypto = {\r
98 > +     .decrypt = FALSE,\r
99 > +     .gpgctx = NULL,\r
100 > +    };\r
101 >      int format = FORMAT_DEFAULT;\r
102 >      int reply_all = TRUE;\r
103 >  \r
104 > diff --git a/notmuch-show.c b/notmuch-show.c\r
105 > index 8b4d308..c606333 100644\r
106 > --- a/notmuch-show.c\r
107 > +++ b/notmuch-show.c\r
108 > @@ -983,7 +983,15 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))\r
109 >      char *query_string;\r
110 >      int opt_index, ret;\r
111 >      const notmuch_show_format_t *format = &format_text;\r
112 > -    notmuch_show_params_t params = { .part = -1, .omit_excluded = TRUE };\r
113 > +    notmuch_crypto_t crypto = {\r
114 > +     .decrypt = FALSE,\r
115 > +     .gpgctx = NULL,\r
116 > +    };\r
117 > +    notmuch_show_params_t params = {\r
118 > +     .part = -1,\r
119 > +     .omit_excluded = TRUE,\r
120 > +     .crypto = crypto,\r
121 > +    };\r
122 >      int format_sel = NOTMUCH_FORMAT_NOT_SPECIFIED;\r
123 >      notmuch_bool_t verify = FALSE;\r
124 >      int exclude = EXCLUDE_TRUE;\r
125 > -- \r
126 > 1.7.10\r
127 >\r
128 > _______________________________________________\r
129 > notmuch mailing list\r
130 > notmuch@notmuchmail.org\r
131 > http://notmuchmail.org/mailman/listinfo/notmuch\r