From: Junio C Hamano <gitster@pobox.com>
To: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Cc: git@vger.kernel.org, sandals@crustytoothpaste.net
Subject: Re: [PATCH 1/3] sha256: avoid redefinition for MIN
Date: Mon, 22 Oct 2018 15:00:42 +0900 [thread overview]
Message-ID: <xmqqo9bmv7ud.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20181022053605.81048-2-carenas@gmail.com> ("Carlo Marcelo Arenas Belón"'s message of "Sun, 21 Oct 2018 22:36:03 -0700")
Carlo Marcelo Arenas Belón <carenas@gmail.com> writes:
> it is already defined whenever "sys/param.h" is available
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
> sha256/block/sha256.c | 2 ++
> 1 file changed, 2 insertions(+)
It is a no-brainer to say that this is obviously good. I'd rather
see this become a part of sha256 topic (perhaps squash it in to
eliminate the need to have it as a separate patch), though.
Thanks.
>
> diff --git a/sha256/block/sha256.c b/sha256/block/sha256.c
> index 18350c161a..0d4939cc2c 100644
> --- a/sha256/block/sha256.c
> +++ b/sha256/block/sha256.c
> @@ -130,7 +130,9 @@ static void blk_SHA256_Transform(blk_SHA256_CTX *ctx, const unsigned char *buf)
> }
> }
>
> +#ifndef MIN
> #define MIN(x, y) ((x) < (y) ? (x) : (y))
> +#endif
> void blk_SHA256_Update(blk_SHA256_CTX *ctx, const void *data, size_t len)
> {
> const unsigned char *in = data;
next prev parent reply other threads:[~2018-10-22 6:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-22 5:36 [RFC/PATCH 0/3] refactor MIN macro Carlo Marcelo Arenas Belón
2018-10-22 5:36 ` [PATCH 1/3] sha256: avoid redefinition for MIN Carlo Marcelo Arenas Belón
2018-10-22 6:00 ` Junio C Hamano [this message]
2018-10-22 5:36 ` [PATCH 2/3] git-compat-util: define MIN through compat Carlo Marcelo Arenas Belón
2018-10-22 6:13 ` Junio C Hamano
2018-10-22 6:41 ` Carlo Arenas
2018-10-22 5:36 ` [PATCH 3/3] xdiff: use compat's MIN instead Carlo Marcelo Arenas Belón
2018-10-22 5:59 ` Junio C Hamano
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=xmqqo9bmv7ud.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=carenas@gmail.com \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.