All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org
Cc: sandals@crustytoothpaste.net,
	"Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Subject: [PATCH 1/3] sha256: avoid redefinition for MIN
Date: Sun, 21 Oct 2018 22:36:03 -0700	[thread overview]
Message-ID: <20181022053605.81048-2-carenas@gmail.com> (raw)
In-Reply-To: <20181022053605.81048-1-carenas@gmail.com>

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(+)

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;
-- 
2.19.1


  reply	other threads:[~2018-10-22  5:36 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 ` Carlo Marcelo Arenas Belón [this message]
2018-10-22  6:00   ` [PATCH 1/3] sha256: avoid redefinition for MIN Junio C Hamano
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=20181022053605.81048-2-carenas@gmail.com \
    --to=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.