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

[PATCH] builtin/receive-pack: dead initializer for retval in check_nonce

From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Date
Oct 20, 2018, 07:08 UTC
Message-ID
<20181020070859.48172-1-carenas@gmail.com>

NONCE_BAD is explicitly set when needed with the fallback instead as NONCE_SLOP

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 builtin/receive-pack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 95740f4f0e..ecce3d4043 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -507,7 +507,7 @@ static const char *check_nonce(const char *buf, size_t len)
 	char *nonce = find_header(buf, len, "nonce", NULL);
 	timestamp_t stamp, ostamp;
 	char *bohmac, *expect = NULL;
-	const char *retval = NONCE_BAD;
+	const char *retval;
 
 	if (!nonce) {
 		retval = NONCE_MISSING;
-- 
2.19.1
Next: Torsten Bögershausen
Message 1 of 4 in “builtin/receive-pack: dead initializer for retval in check_nonce”
  1. builtin/receive-pack: dead initializer for retval in check_nonceCarlo Marcelo Arenas Belón, Oct 20, 2018
  2. Torsten BögershausenOct 20, 2018
  3. Carlo ArenasOct 21, 2018
  4. 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.