git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Jeff King <peff@peff.net>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH 0/6] minor test-hashmap fixes
Date: Wed, 14 Feb 2018 10:41:35 -0800	[thread overview]
Message-ID: <CAGZ79kZ5a1-znO_efwVbrRpXwboZHeiC+4PqB0SDR2Xwv5P+8g@mail.gmail.com> (raw)
In-Reply-To: <20180214180322.GA9190@sigill.intra.peff.net>

On Wed, Feb 14, 2018 at 10:03 AM, Jeff King <peff@peff.net> wrote:
> This series started with me fixing the sizeof() mismatch discussed in
>
>   https://public-inbox.org/git/20180214164628.GA907@sigill.intra.peff.net/
>
> but I found a number of minor irritations. Most of them are cosmetic in
> practice, but I think it's important for test-helper code like this to
> model best practices, since people are likely to use it as a reference.
>
>   [1/6]: test-hashmap: use ALLOC_ARRAY rather than bare malloc
>   [2/6]: test-hashmap: check allocation computation for overflow
>   [3/6]: test-hashmap: use xsnprintf rather than snprintf
>   [4/6]: test-hashmap: use strbuf_getline rather than fgets
>   [5/6]: test-hashmap: simplify alloc_test_entry
>   [6/6]: test-hashmap: use "unsigned int" for hash storage
>

The whole series is
Reviewed-by: Stefan Beller <sbeller@google.com>

Thanks for improving the example code.
I have lost track of the hashmap improvements lately, but with
such a good test helper, we could reduce the amount of
commented code in hashmap.h and just link to the test helper?
(as an extra step after this series, I thought we already had that)

Thanks,
Stefan

  parent reply	other threads:[~2018-02-14 18:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 18:03 [PATCH 0/6] minor test-hashmap fixes Jeff King
2018-02-14 18:05 ` [PATCH 1/6] test-hashmap: use ALLOC_ARRAY rather than bare malloc Jeff King
2018-02-14 18:47   ` Code AI
2018-02-14 18:06 ` [PATCH 2/6] test-hashmap: check allocation computation for overflow Jeff King
2018-02-14 18:06 ` [PATCH 3/6] test-hashmap: use xsnprintf rather than snprintf Jeff King
2018-02-14 18:07 ` [PATCH 4/6] test-hashmap: use strbuf_getline rather than fgets Jeff King
2018-02-14 18:08 ` [PATCH 5/6] test-hashmap: simplify alloc_test_entry Jeff King
2018-02-14 19:01   ` Junio C Hamano
2018-02-14 18:08 ` [PATCH 6/6] test-hashmap: use "unsigned int" for hash storage Jeff King
2018-02-14 18:41 ` Stefan Beller [this message]
2018-02-14 18:48   ` [PATCH 0/6] minor test-hashmap fixes Jeff King

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=CAGZ79kZ5a1-znO_efwVbrRpXwboZHeiC+4PqB0SDR2Xwv5P+8g@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).