git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <bebarino@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Jeff King <peff@peff.net>, Jakub Narebski <jnareb@gmail.com>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] hash: Remove useless init_hash()
Date: Wed, 28 Jul 2010 00:33:55 -0700	[thread overview]
Message-ID: <4C4FDD63.9050303@gmail.com> (raw)
In-Reply-To: <AANLkTikHLZlBQW8DSZrxeA-RDOh2Iy6hc0p821tDQoN8@mail.gmail.com>

  On 07/27/2010 12:58 PM, Ævar Arnfjörð Bjarmason wrote:
>
>> That being said, I agree with the comments that removing init_hash
>> actually makes the code _less_ readable. You could just replace these
>> three lines with a memset, but why? It's just code churn.
> Yeah, and for the record it also missed this part in hash.c:
>
>      void free_hash(struct hash_table *table)
>      {
>      	free(table->array);
>      	table->array = NULL;
>      	table->size = 0;
>      	table->nr = 0;
>      }
>
> Have fun everyone :)

Ok, seems like nobody thinks this is a good idea so I'm fine with dropping it. The minimal savings (if at all) doesn't seem worth the code churn. One less patch in the queue ;-)

  reply	other threads:[~2010-07-28  7:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-27  5:36 [PATCH] hash: Remove useless init_hash() Stephen Boyd
2010-07-27 10:30 ` Jakub Narebski
2010-07-27 10:36   ` Ævar Arnfjörð Bjarmason
2010-07-27 19:49     ` Jeff King
2010-07-27 19:58       ` Ævar Arnfjörð Bjarmason
2010-07-28  7:33         ` Stephen Boyd [this message]
2010-07-27 15:55 ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C4FDD63.9050303@gmail.com \
    --to=bebarino@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=peff@peff.net \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).