Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 05E34431FAF for ; Thu, 17 May 2012 07:26:45 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.29 X-Spam-Level: X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 XnQYg95OrMkj for ; Thu, 17 May 2012 07:26:43 -0700 (PDT) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id 4F528431FAE for ; Thu, 17 May 2012 07:26:43 -0700 (PDT) Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) by fire-doxen-postvirus (Postfix) with ESMTP id B6A362E50D4C; Thu, 17 May 2012 07:26:38 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new Received: from finestructure.net (cpe-98-14-81-93.nyc.res.rr.com [98.14.81.93]) (Authenticated sender: jrollins) by fire-doxen-submit (Postfix) with ESMTP id D977A2E50CC1; Thu, 17 May 2012 07:26:35 -0700 (PDT) Received: by finestructure.net (Postfix, from userid 1000) id D03404FD; Thu, 17 May 2012 07:26:32 -0700 (PDT) From: Jameson Graef Rollins To: Jani Nikula , Notmuch Mail Subject: Re: [PATCH 4/6] cli: intialize crypto structure in show and reply In-Reply-To: <8762bvi70k.fsf@nikula.org> 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> <8762bvi70k.fsf@nikula.org> User-Agent: Notmuch/0.12+183~g9d5ff3c (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Thu, 17 May 2012 07:26:30 -0700 Message-ID: <877gwaeve1.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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 14:26:45 -0000 --=-=-= On Thu, May 17 2012, Jani Nikula wrote: > 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). It may be technically unnecessary, but why is that a reason to not do it? I intentionally did this to make it clear what the defaults are. Otherwise the defaults are essentially undefined, which is not good. Maybe the structure initializes to the correct defaults, but why count on that when we can set them to the correct default, and have it clear to readers of the code? jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCAAGBQJPtQqWAAoJEO00zqvie6q87lMP/1dNXTVFfvyNJVT65AVie7bj rinWFVmi2qY/biIM2JUtAa9HDgD8CdVgG+oA/DNrlgpm72Ommexgl8CvvW2StZVX IMnFGMXiwjmToLPJq0jL8b0Bq2IVNUi7K7yLDhh04Fv64EMWCYF58aYj5tJ9dA8N HkKEyuYZoNc3xNqgjDTVSSKI0tjmGUFNaEQAvFvucdXJ4Ca8dHsYrpg7HD35d/0J Q1sRj6wlEkmTgmxbkNBx6NRnSCGVv/QhnK2aRpjIk0EL7vdE4ZA1IzuY73OQWLvn QMQRacmAAHZkyVmJlaKmTdUx4Z7AdeGrYLTvf/LDNME9bfJmIbykDTRMqZ7k+KZ6 vqqfvvP2HZJePWSAhTnB7Rb9Fl0lDylgRqdq6wtu/L12rmwhOGVvAQqUmTerKe1E ugEnb/rhZ/KcNYXFS4G9dV6I4SD4sIyW14380ZiKur6vwpcA3rPDwrFNeX+C6bEH Jmob8Q9WfqjhPUDuG6ngSOSx0+D1pABPALCimSdalKtGj/hhas/L8kkj8MMHCN00 S98fwle+fo8uJFAMjeaE3XQ0WJPD8AdH/nBGL6EzNb9liUlH2cygTs0zD8wRutUv Z717CXKeoolz0ls8hm3a7Poab1DIw6Oi5OzYxXNy6TmOmoI7dJXUemSfUTiR77mk BbH8yDE64UlYFNYyExkF =hE/w -----END PGP SIGNATURE----- --=-=-=--