From 8f075ae6a7feae5331d35bb72cff7233c2495c02 Mon Sep 17 00:00:00 2001 From: "ian.mcgreer%sun.com" Date: Thu, 7 Mar 2002 22:53:40 +0000 Subject: [PATCH] additional change to last patch, suggested by wtc r=wtc git-svn-id: svn://10.0.0.236/trunk@116099 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/pki/pki3hack.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mozilla/security/nss/lib/pki/pki3hack.c b/mozilla/security/nss/lib/pki/pki3hack.c index 0bdc119264c..27eb9e85df0 100644 --- a/mozilla/security/nss/lib/pki/pki3hack.c +++ b/mozilla/security/nss/lib/pki/pki3hack.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.41 $ $Date: 2002-03-07 22:07:58 $ $Name: not supported by cvs2svn $"; +static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.42 $ $Date: 2002-03-07 22:53:40 $ $Name: not supported by cvs2svn $"; #endif /* DEBUG */ /* @@ -827,11 +827,9 @@ fill_CERTCertificateFields(NSSCertificate *c, CERTCertificate *cc, PRBool forced NSSCryptoContext *context = c->object.cryptoContext; nssCryptokiInstance *instance = get_cert_instance(c); NSSUTF8 *stanNick; - if (instance) { - stanNick = instance->label; - } else if (context) { - stanNick = c->object.tempName; - } + /* must live somewhere */ + PORT_Assert(instance != NULL || context != NULL); + stanNick = instance ? instance->label : c->object.tempName; /* fill other fields needed by NSS3 functions using CERTCertificate */ if ((!cc->nickname && stanNick) || forced) { PRStatus nssrv;