[openssh-commits] [openssh] 02/02: upstream: remove unnecessary if statement.

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Aug 1 19:56:11 AEST 2023


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit c88a8788f9865d02b986d00405b9f0be65ad0b5a
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Tue Aug 1 08:15:04 2023 +0000

    upstream: remove unnecessary if statement.
    
    github PR#422 from eyalasulin999, ok djm@
    
    OpenBSD-Commit-ID: 2b6b0dde4407e039f58f86c8d2ff584a8205ea55
---
 sshconnect2.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/sshconnect2.c b/sshconnect2.c
index bc05f021..90cbba68 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.366 2023/03/09 07:11:05 dtucker Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.367 2023/08/01 08:15:04 dtucker Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Damien Miller.  All rights reserved.
@@ -1868,12 +1868,10 @@ userauth_pubkey(struct ssh *ssh)
 		 * private key instead
 		 */
 		if (id->key != NULL) {
-			if (id->key != NULL) {
-				ident = format_identity(id);
-				debug("Offering public key: %s", ident);
-				free(ident);
-				sent = send_pubkey_test(ssh, id);
-			}
+			ident = format_identity(id);
+			debug("Offering public key: %s", ident);
+			free(ident);
+			sent = send_pubkey_test(ssh, id);
 		} else {
 			debug("Trying private key: %s", id->filename);
 			id->key = load_identity_file(id);

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list