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

Re: [PATCH] block-sha1: drop trailing semicolon from macro definition

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Mar 15, 2021, 23:07 UTC
Message-ID
<YE/oq5dPDB6PvD22@google.com>
In-Reply-To
<f8122736-e729-5d35-e1e1-78a213816d4a@web.de>
René Scharfe. wrote:
Show 14 quoted lines
> 23119ffb4e (block-sha1: put expanded macro parameters in parentheses,
> 2012-07-22) added a trailing semicolon to the definition of SHA_MIX
> without explanation.  It doesn't matter with the current code, but make
> sure to avoid potential surprises by removing it again.
>
> This allows the macro to be used almost like a function: Users can
> combine it with operators of their choice, but still must not pass an
> expression with side-effects as a parameter, as it would be evaluated
> multiple times.
>
> Signed-off-by: René Scharfe <l.s.r@web.de>
> ---
>  block-sha1/sha1.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Yes, it was just a typo.
Previous: René Scharfe.
Message 2 of 2 in “block-sha1: drop trailing semicolon from macro definition”
  1. block-sha1: drop trailing semicolon from macro definitionRené Scharfe., Mar 13, 2021
  2. Jonathan NiederMar 15, 2021

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.