git: 776b9127edb1 - stable/12 - ssh: apply style(9) to version_addendum

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 25 Apr 2022 01:05:44 UTC
The branch stable/12 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=776b9127edb1c9a9b91f39ec9328f302c21ca36a

commit 776b9127edb1c9a9b91f39ec9328f302c21ca36a
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-04-18 21:20:25 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-04-25 01:05:33 +0000

    ssh: apply style(9) to version_addendum
    
    Reported by:    allanjude (in review D29953)
    Fixes:          462c32cb8d7a ("Upgrade OpenSSH to 6.1p1.")
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 613b4b79713e294140757270f02a8aa6273be3d4)
---
 crypto/openssh/ssh.c  | 2 +-
 crypto/openssh/sshd.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/crypto/openssh/ssh.c b/crypto/openssh/ssh.c
index 19e13d4f212c..f01cb75e0237 100644
--- a/crypto/openssh/ssh.c
+++ b/crypto/openssh/ssh.c
@@ -873,7 +873,7 @@ main(int ac, char **av)
 			}
 			break;
 		case 'V':
-			if (options.version_addendum &&
+			if (options.version_addendum != NULL &&
 			    *options.version_addendum != '\0')
 				fprintf(stderr, "%s %s, %s\n", SSH_RELEASE,
 				    options.version_addendum,
diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c
index 25a3769b4823..f2fa2c56625b 100644
--- a/crypto/openssh/sshd.c
+++ b/crypto/openssh/sshd.c
@@ -924,7 +924,8 @@ drop_connection(int sock, int startups, int notify_pipe)
 static void
 usage(void)
 {
-	if (options.version_addendum && *options.version_addendum != '\0')
+	if (options.version_addendum != NULL &&
+	    *options.version_addendum != '\0')
 		fprintf(stderr, "%s %s, %s\n",
 		    SSH_RELEASE,
 		    options.version_addendum, OPENSSL_VERSION_STRING);