From: dtucker Date: Tue, 1 Aug 2023 08:15:04 +0000 (+0000) Subject: remove unnecessary if statement. github PR#422 from eyalasulin999, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bc597a2f7cc373e542a92172438069852b55e67d;p=openbsd remove unnecessary if statement. github PR#422 from eyalasulin999, ok djm@ --- diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c index 70ab97e195d..dbc338fb867 100644 --- a/usr.bin/ssh/sshconnect2.c +++ b/usr.bin/ssh/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. @@ -1861,12 +1861,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);