From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3B801431FAF for ; Thu, 17 May 2012 00:47:17 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CebulSJXHkZN for ; Thu, 17 May 2012 00:47:15 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 28EF4431FAE for ; Thu, 17 May 2012 00:47:15 -0700 (PDT) Received: by lbbgk8 with SMTP id gk8so1278806lbb.26 for ; Thu, 17 May 2012 00:47:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type:x-gm-message-state; bh=F2dp61T4JfihWbyCBxJMKzIYg4q2EY6Q4lSGrFBN8mk=; b=eXfEgdXUgdn5eRqtgpagdCda9f0dLkE0oBbU5UCilwMUlhGz6/FtphldWAFoxTVzOW Y4RYovgZa5NX5YNEBR4krKOeqTN3yBpxvck3pajCTe4HZBiVhXd6Bd/iXgsUTJUo1g7w yadTmLthoKh0XRXz7u6xQ1WrgKDVOCT3L7/fUdB6QTFuBKcAloWv3ONQGkuQOEQEo4Hh qohpr93i7RKPPH7RNg3pNSspsG0mFtCnQeFEXG26CnBvbyKO+4SnopaswyLv/WjvwL/C GGiPRqhh9HnOXm+8iKcp8VPni1AR7GFnMxfgpHeAxaCJrnaHGJ1M7ci8E7GW+2eS7pJB QYAg== Received: by 10.112.37.164 with SMTP id z4mr2554077lbj.100.1337240833446; Thu, 17 May 2012 00:47:13 -0700 (PDT) Received: from localhost (dsl-hkibrasgw4-fe50dc00-68.dhcp.inet.fi. [80.220.80.68]) by mx.google.com with ESMTPS id pi5sm6733290lab.7.2012.05.17.00.47.11 (version=SSLv3 cipher=OTHER); Thu, 17 May 2012 00:47:12 -0700 (PDT) From: Jani Nikula To: Jameson Graef Rollins , Notmuch Mail Subject: Re: [PATCH 4/6] cli: intialize crypto structure in show and reply In-Reply-To: <1337205359-2444-5-git-send-email-jrollins@finestructure.net> References: <1337205359-2444-1-git-send-email-jrollins@finestructure.net> <1337205359-2444-2-git-send-email-jrollins@finestructure.net> <1337205359-2444-3-git-send-email-jrollins@finestructure.net> <1337205359-2444-4-git-send-email-jrollins@finestructure.net> <1337205359-2444-5-git-send-email-jrollins@finestructure.net> User-Agent: Notmuch/0.13+13~gc259b9a (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) Date: Thu, 17 May 2012 10:47:07 +0300 Message-ID: <8762bvi70k.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gm-Message-State: ALoCoQn5SbS6ewBw7rpg/F3w+q/SnKJ/MYYEJqaCIWL12lH+jGk2CJsWkTnzSNT0yHvED5nA3yY4 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 07:47:17 -0000 On Thu, 17 May 2012, Jameson Graef Rollins wrote: > This makes sure it has proper initialization values when it's created. Please don't do this. It's unnecessary; if one field is initialized with a designated initializer, the rest are initialized to zero (or NULL). BR, Jani. > --- > notmuch-reply.c | 5 ++++- > notmuch-show.c | 10 +++++++++- > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/notmuch-reply.c b/notmuch-reply.c > index 6662adb..3c967a0 100644 > --- a/notmuch-reply.c > +++ b/notmuch-reply.c > @@ -673,7 +673,10 @@ notmuch_reply_command (void *ctx, int argc, char *argv[]) > char *query_string; > int opt_index, ret = 0; > int (*reply_format_func)(void *ctx, notmuch_config_t *config, notmuch_query_t *query, notmuch_crypto_t *crypto, notmuch_bool_t reply_all); > - notmuch_crypto_t crypto = { .decrypt = FALSE }; > + notmuch_crypto_t crypto = { > + .decrypt = FALSE, > + .gpgctx = NULL, > + }; > int format = FORMAT_DEFAULT; > int reply_all = TRUE; > > diff --git a/notmuch-show.c b/notmuch-show.c > index 8b4d308..c606333 100644 > --- a/notmuch-show.c > +++ b/notmuch-show.c > @@ -983,7 +983,15 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) > char *query_string; > int opt_index, ret; > const notmuch_show_format_t *format = &format_text; > - notmuch_show_params_t params = { .part = -1, .omit_excluded = TRUE }; > + notmuch_crypto_t crypto = { > + .decrypt = FALSE, > + .gpgctx = NULL, > + }; > + notmuch_show_params_t params = { > + .part = -1, > + .omit_excluded = TRUE, > + .crypto = crypto, > + }; > int format_sel = NOTMUCH_FORMAT_NOT_SPECIFIED; > notmuch_bool_t verify = FALSE; > int exclude = EXCLUDE_TRUE; > -- > 1.7.10 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch