[openssh-commits] [openssh] 01/02: upstream: Ensure both sides of the test are non-NULL instead of just

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Nov 17 21:40:52 AEDT 2025


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

dtucker pushed a commit to branch master
in repository openssh.

commit 2fe6e406b496b54351dab923f9be95579d39d071
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Mon Nov 17 09:59:13 2025 +0000

    upstream: Ensure both sides of the test are non-NULL instead of just
    
    either. Coverity CID 443285.
    
    OpenBSD-Regress-ID: aa90e57b1bc8efce9e50734a07a8ffec0680059a
---
 regress/unittests/hostkeys/test_iterate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/regress/unittests/hostkeys/test_iterate.c b/regress/unittests/hostkeys/test_iterate.c
index 65d6d1f43..a330adce5 100644
--- a/regress/unittests/hostkeys/test_iterate.c
+++ b/regress/unittests/hostkeys/test_iterate.c
@@ -1,4 +1,4 @@
-/* 	$OpenBSD: test_iterate.c,v 1.10 2025/05/06 06:05:48 djm Exp $ */
+/* 	$OpenBSD: test_iterate.c,v 1.11 2025/11/17 09:59:13 dtucker Exp $ */
 /*
  * Regress test for hostfile.h hostkeys_foreach()
  *
@@ -133,7 +133,7 @@ check(struct hostkey_foreach_line *l, void *_ctx)
 			ASSERT_INT_EQ(sshkey_equal(l->key, expected->l.key), 1);
 		}
 	}
-	if (parse_key && !(l->comment == NULL && expected->l.comment == NULL))
+	if (parse_key && l->comment != NULL && expected->l.comment != NULL)
 		ASSERT_STRING_EQ(l->comment, expected->l.comment);
 	return 0;
 }

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


More information about the openssh-commits mailing list