summaryrefslogtreecommitdiff
path: root/security/nss/lib/certdb/secname.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/lib/certdb/secname.c')
-rw-r--r--security/nss/lib/certdb/secname.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/security/nss/lib/certdb/secname.c b/security/nss/lib/certdb/secname.c
index 6d3e9d3720..654dfdf3f0 100644
--- a/security/nss/lib/certdb/secname.c
+++ b/security/nss/lib/certdb/secname.c
@@ -568,8 +568,8 @@ CERT_CompareRDN(const CERTRDN *a, const CERTRDN *b)
SECComparison
CERT_CompareName(const CERTName *a, const CERTName *b)
{
- CERTRDN **ardns, *ardn;
- CERTRDN **brdns, *brdn;
+ CERTRDN **ardns;
+ CERTRDN **brdns;
int ac, bc;
SECComparison rv = SECEqual;
@@ -587,18 +587,8 @@ CERT_CompareName(const CERTName *a, const CERTName *b)
if (ac > bc)
return SECGreaterThan;
- for (;;) {
- if (!ardns++ || !brdns++) {
- break;
- }
- ardn = *ardns;
- brdn = *brdns;
- if (!ardn) {
- break;
- }
- rv = CERT_CompareRDN(ardn, brdn);
- if (rv)
- return rv;
+ while (rv == SECEqual && *ardns) {
+ rv = CERT_CompareRDN(*ardns++, *brdns++);
}
return rv;
}