Thread (1 message) 1 message, 1 author, 2026-02-06

Re: [PATCH v2 2/2] gpg-interface: remove an unnecessary NULL initialization

From: Junio C Hamano <hidden>
Date: 2026-02-06 01:59:15

Collin Funk [off-list ref] writes:
We assign this variable unconditionally, so we do not need to assign it
to NULL where it is declared.
The latter "assign" is better phrased as "initialize", but other
than that this looks great.

Thanks.

quoted hunk
Signed-off-by: Collin Funk <redacted>
---
 gpg-interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gpg-interface.c b/gpg-interface.c
index 377c0cf49f..87fb6605fb 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -398,7 +398,7 @@ static void parse_ssh_output(struct signature_check *sigc)
 {
 	const char *line, *principal, *search;
 	char *to_free;
-	const char *key = NULL;
+	const char *key;
 
 	/*
 	 * ssh-keygen output should be:
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help