git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] sha256: avoid redefinition for MIN

From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Date
Oct 22, 2018, 05:36 UTC
Message-ID
<20181022053605.81048-2-carenas@gmail.com>
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
Previous: Carlo Marcelo Arenas BelónNext: Junio C Hamano
Message 2 of 8 in “refactor MIN macro”
  1. 0/3 refactor MIN macroCarlo Marcelo Arenas Belón, Oct 22, 2018
  2. 1/3 sha256: avoid redefinition for MINCarlo Marcelo Arenas Belón, Oct 22, 2018
  3. Junio C HamanoOct 22, 2018
  4. 2/3 git-compat-util: define MIN through compatCarlo Marcelo Arenas Belón, Oct 22, 2018
  5. Junio C HamanoOct 22, 2018
  6. Carlo ArenasOct 22, 2018
  7. 3/3 xdiff: use compat's MIN insteadCarlo Marcelo Arenas Belón, Oct 22, 2018
  8. Junio C HamanoOct 22, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.